4 ms·
This was a helpful writeup. Nim has a lot of really nice features. Are there any problems or things you find lacking?
by mej10 12y ago
This was a helpful writeup. Nim has a lot of really nice features. Are there any problems or things you find lacking?
- def- 12y agoThe compiler isn't completely stable yet. Often I ran into problems combining multiple features, when I filled up Nim's Rosetta Code entries: https://github.com/def-/nim-unsorted https://github.com/def-/nim-unsorted http://rosettacode.org/wiki/Category:Nimrod http://rosettacode.org/wiki/Category:Nimrod The libraries aren't really there yet. Their number is growing, but some important ones are still missing: http://nim-lang.org/lib.html http://nim-lang.org/lib.html So Nim really needs more active users and contributors.
- tenfingers 12y agoThe idea that thisFunction and this_function are the same might be worse than the problem they're trying to solve. I cannot unfortunately have experience with larg-ish codebases in nim to tell if this would result in an actual problem or not, but the idea that I have to scan between two possible identifiers in the code can be a source of stupid bugs in the same vein as case-insensitive identifiers. On the other hand I can definitely see the appeal of it (some python packages go against the recommendation and sort-of taint the style of other sources). This so far was the only "weird" comment I could think of.
- gjm11 12y agoThat seems like a really bad idea. It means that searching for an identifier requires you to allow for the possibility that there might be any number of underscores inserted anywhere. I suppose in practice you'll rely on the fact that no one will be inserting them other than at word boundaries, but it still seems horrible. (I'd worry about ambiguities of the experts exchange / expert sex change type, too, but my guess is that they're extremely rare and usually either harmless or instantly caught by the compiler. Still, the mere possibility makes me twitchy.)
- gfasdgsfd 12y agoI'm personally not too happy about this, but there are restrictions on the use of underscores: - You cannot have two underscores in a row - You cannot have a leading underscore
- deleted 12y ago[deleted]
- def- 12y agoI would consider it bad style to abuse the case-insensitivity like that. It can be used for good too, for example if you have a bunch of different naming conventions in the libraries you use: proc some_lib_function(x: int) = echo "hi ", x proc anotherLibFunction(x: int) = echo "hi ", x proc crAzY_LIB_WRITERS(x: int) = echo "hi ", x Then you can still call them consistently: someLibFunction(10) anotherLibFunction(11) crazyLibWriters(12)
- ebiester 12y agoCertainly, I would have some sort of lint to enforce naming conventions. I don't like it at all. Searching for a function becomes a nightmare.
- EXetoC 12y agoIs it not good enough to have specific grep tools? nimgrep for example, and there are procs for working with this IIRC.