crow;

Jan 23
Permalink

10年前、とあるプロジェクトで、 入社3年目元気ハツラツ A君 「C言語の三項演算子がどうにも読みづらくて苦手なのでコーディングルールで禁止しましょう!!」 中堅 Bさん 「いやいや、数少ないショートコードのチャンスをどーして奪うんだ! ただでさえダラダラと長いんだぞ!」 いつも直球? Eさん 「おまえは今、三項演算子大好きなオレに Excelを使うな、Wordを使えって言ったようなもんだぞ(謎」 嫌々チームリーダーな Cさん 「ぼくは反対だなー、どうしてもっていうならルールに従うけど、ぼくは反対だなー」 uupaaの飼育員 「突然どうしたんですか?」 窓際 Dさん 「… (タバコ吸いにいく)」

という、和気あいあいなエンジニアトークがあったのを思い出しました。

話をよく聞くとA君が言いたかったのは、多段化された三項演算子がイヤだと

// これはいいけど a = b ? c : d;

// 括弧の対応もよくわからないような、これ(↓)は無理 a = b ? (c ? d : e) : d ? f : g ? h : i;

いう話で、それについては極力なくそうと言う感じにルール化されました。とさ

// 括弧入れても、やっぱりよく分かりません。 a = b ? (c ? d : e)  : (d ? f  : (g ? h : i));

おしまい。

犯人は B さんね

  1. oglo reblogged this from otsune
  2. capper reblogged this from otsune
  3. gakkie reblogged this from tayu-tau
  4. m-zzataka reblogged this from otsune
  5. daxanya1 reblogged this from otsune
  6. kotba reblogged this from otsune
  7. mxiz reblogged this from otsune
  8. kenblr reblogged this from otsune
  9. manmo reblogged this from nobby0-0
  10. jhockey reblogged this from tayu-tau
  11. tayu-tau reblogged this from soothingnoise
  12. yokokick reblogged this from soothingnoise
  13. soothingnoise reblogged this from mtsuyugu
  14. nobby0-0 reblogged this from otsune
  15. staccatoto reblogged this from atm09td
  16. ken0205 reblogged this from otsune
  17. atm09td reblogged this from otsune
  18. non117 reblogged this from athsear
  19. fujikky reblogged this from otsune
  20. uessai-text reblogged this from otsune
  21. invoke reblogged this from otsune
  22. athsear reblogged this from otsune
  23. athsear reblogged this from otsune
  24. wktksan reblogged this from otsune
  25. fujihajime reblogged this from otsune
  26. ryoheblr reblogged this from otsune
  27. ryujisnote reblogged this from otsune
  28. mashiroku reblogged this from otsune
  29. lifestar reblogged this from otsune
  30. syone reblogged this from otsune
  31. grunauer reblogged this from wizardblue
  32. mtsuyugu reblogged this from otsune
  33. gosunatxrea reblogged this from otsune
  34. rywzie reblogged this from otsune
  35. wizardblue reblogged this from otsune
  36. otafood reblogged this from otsune
  37. bragging-boozer reblogged this from otsune
  38. nashi-kyo reblogged this from otsune
  39. tmbtter reblogged this from otsune
  40. ipodstyle reblogged this from otsune
  41. flyingson reblogged this from otsune
  42. boomboomboo reblogged this from otsune
  43. copypetter reblogged this from otsune
  44. skoei reblogged this from otsune
  45. text-man reblogged this from otsune