back

by srean·15y ago·view on hn ↗
From the docs:

  Case is insignificant in Nimrod and even underscores are ignored: 
  This_is_an_identifier and ThisIsAnIdentifier are the same identifier.
  This feature enables you to use other people's code without bothering
  about a naming convention that conflicts with yours. It also frees you
  from remembering the exact spelling of an identifier (was it parseURL
  or parseUrl or parse_URL?).
This has been discussed on Reddit before. I do not like this convention. Its a nuisance if you want to search the code for a particular identifier when it has been spelled in multiple ways. I find it jarring to read code where the same variable has been spelled differently. My brain flags it every time and I have to remind myself that they are the same thing. I can possibly retrain my brain, but I do not want to do that because in almost all other contexts case and underscore does matter.

To me it appears to solve a problem that isnt much of a problem. It is fairly easy to detect misspelled identifiers during code compilation.

2 comments
That is horrible. I like to name my classes e.g "Object" and call instances of that class with the lower case equivalent.. "object".
Apart from a few built-in keyword operators such as and, or, not, operators always consist of these characters: + - ∗ \ / < > = @ $ ~ & % ! ? ^ . |

User defined operators are allowed. Nothing stops you from defining your own @!?+~ operator, but readability can suffer.

The longest one I saw in the tutorial was a -+- operator in the set operations.

(Note: one of the legal operators in an asterisk, which I transcoded to a similar looking unicode character to avoid offending the HN quote system. It really is an asterisk, not whatever your browser displayed.)