evmorov / lang-compare

Side-by-side language comparison
https://evmorov.github.io/lang-compare
MIT License
28 stars 7 forks source link

Constants #4

Closed sirex closed 8 years ago

sirex commented 8 years ago

What should be shown in code examples under Constant and Constant list sections?

Python does not have such thing as constant, but have a naming convention for variables that supposed to be used as constants.

Can I add example with python constants using conventional approach, rather than real constants?

evmorov commented 8 years ago

I've changed a bit the examples for Constant http://evmorov.github.io/lang-compare/ruby-coffeescript/#other_structure_constant. Now I'm making an attempt to change a constant.

Result:

For me, this project isn't a full language reference but more a rather small cheat sheet to refresh my knowledge when I need to write something in a language that I don't use often.

What I want to say that there is no dogma. I don't know Python but if you think that it can be useful to provide an example for you and for other people and will not insult anyone - do it. Also, if people use such constants in real projects it's another reason to add it.

sirex commented 8 years ago

Added constants in #6.