Hacker News new | ask | show | jobs
by edd 5206 days ago
The reason I would advocate using hyphens is you should do what the language (standard libraries) do. For example:

    css:
    margin-left, border-bottom (hyphenate)

    javascript:
    getElementById, documentNode (lower camel case)

    ruby:
    each_index, has_key? (underscore)
1 comments

This would be an interesting discussion. I prefer to use the same coding style for the whole project without caring how the original authors of each language did it. I do however understand that the language API follows the original convention so one would eventually break it by following by reasoning. Ex in js: make_element_slide(getElementById('box')).