4 ms·
I've tried learning it a couple times, but the syntax seems so irregular and non-uniform. It's confusing and annoying.
by seanw444 4y ago
I've tried learning it a couple times, but the syntax seems so irregular and non-uniform. It's confusing and annoying.
- cb321 4y agoNim gives a bit more choice in many dimensions than many languages -- how to manage memory, whether to use the stdlib at all for things like hash tables, and yes, also syntactic choices like several ways to call a function. This can actually be convenient in constructing a DSL for something with minimal fuss. While `func arg1 arg2` might look weird in "real" "code", it might look great inside some DSL and you can just have it be a "regular Nim invocation" instead of something special to get that. There are also compile-time superpowers like macros that just receive a parsed AST. That can be used to "re-parse" or "re-compile" external code as in https://github.com/c-blake/cligen https://github.com/c-blake/cligen. So, trade-offs like in all of life. There is even a book called The Paradox Of Choice [1]. I think there is just a spectrum/distribution of human predisposition where some like to have things "standardized & packaged up for them" while others more like to invent their own rules..and enough variation within the population that people have to learn to agree to disagree more. (EDIT: and FWIW, I think this is context-modulated - the same person could be on one end of the spectrum about gardening and the other about software.) I do feel like the syntax is far less chaotic than Perl. [1] https://en.wikipedia.org/wiki/The_Paradox_of_Choice https://en.wikipedia.org/wiki/The_Paradox_of_Choice
- olah_1 4y agoI think this is because it takes more stylistic influence from Oberon than it does from Python. https://en.wikipedia.org/wiki/Nim_(programming_language)#Influence https://en.wikipedia.org/wiki/Nim_(programming_language)#Inf...