6 ms·
Nim has some good ideas but I can't get over the syntax: - Significant whitespace, but tabs are forbidden - No block comments, save for `discard """ ... ""
by CyberShadow 12y ago
Nim has some good ideas but I can't get over the syntax:
- Significant whitespace, but tabs are forbidden
- No block comments, save for `discard """ ... """`
- Identifiers are case and underscore-insensitive (FOO_BAR === fooBar === fo_ob_ar)
- def- 12y ago> - Significant whitespace, but tabs are forbidden Here's the reasoning: https://github.com/Araq/Nim/wiki/Whitespace-FAQ#tabs-vs-spaces https://github.com/Araq/Nim/wiki/Whitespace-FAQ#tabs-vs-spac... If you still want tabs you can add this at the top of your files and they work: #! replace("\t", " ") > - Identifiers are case and underscore-insensitive (FOO_BAR === fooBar === fo_ob_ar) This changed recently, now the first letter is considered case sensitive: http://nim-lang.org/manual.html#identifier-equality http://nim-lang.org/manual.html#identifier-equality
- CyberShadow 12y ago> Here's the reasoning: https://github.com/Araq/Nim/wiki/Whitespace-FAQ#tabs-vs-spac.. https://github.com/Araq/Nim/wiki/Whitespace-FAQ#tabs-vs-spac.... Honestly, there are less drastic solutions to these problems. Some languages (forgot which) simply forbid mixing tabs and spaces when the tab size makes the code ambiguous. And their C example will generate an "ambiguous else" warning in D, which you can disambiguate by adding braces.
- dom96 12y ago> - No block comments, save for `discard """ ... """` I believe a different syntax for those will be added soon: https://github.com/Araq/Nim/issues/1535 https://github.com/Araq/Nim/issues/1535
- filwit 12y agoNot that it's even really needed... Just select the section of text and use your IDE's shortcuts to comment it out (which now works fine in any IDE due to comments no longer being part of the AST)
- quotemstr 12y agoYou know, we used to mock the Java people for requiring fancy IDEs to work around deficiencies in their language. Now, in Nim, we're designing these warts into the language from the start?
- mVChr 12y ago> - Identifiers are case and underscore-insensitive (FOO_BAR === fooBar === fo_ob_ar) In the language design stages who in the world thought this would be a good idea? Even PHP doesn't do that.
- bpicolo 12y agoLet's be realistic. If you have somebody naming variables: foo_bar = blah foobar = blah fooBar = blah That's someone you really don't want to be coding anywhere near, because it leads to really, really confusing code. So nim is just enforcing not being able to do it it as a language.
- joelthelion 12y agoIt still means you can't reliably grep code for an identifier. Strikes me as a really stupid wart in an otherwise great language. go format is a much better solution to the same problem.
- dom96 12y agoYou can with NimGrep: http://nim-lang.org/nimgrep.html http://nim-lang.org/nimgrep.html
- quotemstr 12y agoIf a language's lexical structure is so tortured that I need a special tool to grep it, I'm going to skip it and go back to the sanity of C++.
- filwit 12y agoRidiculous. We use "special tools" for every other language (Visual Studios, Eclipse, etc).. Calling a language feature, which give programmers style freedom, a "tortured lexical structure" is not an objective argument. Especially since we have a tool (nimgrep) which addresses the issue and takes < minute to learn. Once Nim has better IDE support, no one will be grepping in the first place.
- quotemstr 12y agoUnderscore insensitivity is unforgivable: it makes grep work poorly. I guess I'll have to strike Nim from the list of languages I might want to use.