4 ms·
I prefer free form function names when when parenthesis aren't required after the function name. Hyphens in function names are great too. (member? 'a some_l
by seiji 16y ago
I prefer free form function names when when parenthesis aren't required after the function name. Hyphens in function names are great too.
(member? 'a some_list)
member?('a', some_list) <-- ugly
member? :a, some_list
(check-user-credentials session user)
(is-user-authorized? page user)
- avdempsey 16y agoTrue, not having parens on the end of the function call makes this look better (and those parens are optional in Ruby). Extra kudos to lisp flavors because you could argue they have even "purer" syntax than Python. Mostly, I'm just tickled by the idea of "would my dog bark at it?" as a mental test.
- draegtun 16y agoHyphens in function names are great too Totally agree and there are good reasons why they are useful: http://news.ycombinator.com/item?id=1842575 http://news.ycombinator.com/item?id=1842575 BTW, While perl6 added hyphen usage to variable names :) unfortunately I don't think it added question mark :(