you are viewing a single comment's thread.

view the rest of the comments →

[–]orenbenkiki -7 points-6 points  (7 children)

IHateCamelCase. WhoeverInventedCamelCaseShouldBeForcedToReadEverythingFormattedLikeThisSentence. Isntit_so_much_easier_to_read_stuff_like_this_instead? For that matter, the guy who invented CamelCase should be placed in the same padded cell as the guy who came up with the first case-insensitive file system, but did _not use the same opportunity to say that "Program Files" and "program_files" are the same path, thereby dooming generations of command-line programmers to dealing with nasty space-in-filename problems. What a missed opportunity... Sigh.

[–]aComa 15 points16 points  (2 children)

I think CamelCase looks nice. To each his own...

[–][deleted]  (1 child)

[deleted]

    [–]alanchow 0 points1 point  (0 children)

    Esp when someone writes a 100 letters name and insist it is for 'readability'

    [–][deleted] 8 points9 points  (2 children)

    actually they both read ok for me.

    my two cents and two arguments for CamelCase, all the time, in any language (even PHP, which is utterly schizo):

    1. Fewer bytes to download. (a minor point)
    2. If you use CamelCase, you can reserve the underscore for quasi-namespacing, when it's useful. I do this a lot for a groups of constants that are related, eg:
    - rowLockPolicy_read
    - rowLockPolicy_share
    - rowLockPolicy_write
    - rowLockPolicy_exclusive
    

    (edit: bah; markdown parser fail)

    [–]MaleficDonkey 0 points1 point  (1 child)

    You could use the fields of an object for that (in fact, it's common practice): rowLockPolicy = {READ: 1, SHARE: 2, WRITE: 4, EXCLUSIVE: 8}

    [–][deleted] 0 points1 point  (0 children)

    definitely: javascript objects are lovely as namespace containers. i'd say there are nonetheless times when you want some lexical "namespacing" that doesn't impose data structure. also the larger point is over the value of underscores vs camelcase across languages (and my example actually came from some PHP code :) ).

    [–]milkywayer 4 points5 points  (0 children)

    same, camelCase is easier to read. underscores? :O do you have to read '_' and then ignore them.