6 ms·
The reason I would advocate using hyphens is you should do what the language (standard libraries) do. For example: css: margin-left, border-bottom (hyp
by edd 15y 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)
- iaskwhy 15y agoThis 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')).