On 1/21/11 4:49 PM, Jonathan M Davis wrote:
On Friday, January 21, 2011 13:30:11 Ali Çehreli wrote:
Andrei Alexandrescu wrote:
  >  iswhite

I like separating is with an underscore, like most coding styles do:

    is_whitespace

Warm and fuzzy... :)

Most? I've never dealt with a coding style that had underscores. It's generally
camelcase, though I get the impression that using underscores in C code is more
common (I've mostly used C++ and Java). Regardless however, Phobos' coding style
uses camelcase, not underscores. And this whole thread was started to try and
find better names for functions which need new names, because they don't
currently follow Phobos' naming conventions.

Ever since I worked with STL, I fell in love with names_with_underscores. I can't explain it, but my feeling is that code using that convention is calm and levelheaded. Camel case forces me to think of one-word names because at the second word some beauty is already lost; never felt the same with the underscores. If I could go back in time I'd propose that convention throughout.

Andrei

Reply via email to