Comment by digdugdirk
2 months ago
Do you have any recommendations for well designed open source Nim projects for someone study to get a feel for the language?
2 months ago
Do you have any recommendations for well designed open source Nim projects for someone study to get a feel for the language?
Anything written by Treeform[1] is a good place to start, their libraries make up a big chunk of Nim ecosystem.
1 - https://github.com/treeform/hobby
Honestly hard to say. There are a number of styles of architecting Nim libraries and programs, and almost none match my own. My most particular criticism of the Nim ecosystem is the abuse of macros: There are a number of libraries implementing huge chunks of functionality behind macros such that code paths only appear at compile time and are not reflected in sources. Some libraries constrain macro use, but many are built entirely out of macros. I'd say to avoid looking to those examples.
I think it's safe to say that the proper way to go about using Nim is to use macros only as a last resort. They're powerful and awesome when necessary, but obfuscate the code a lot, and the LSP can't really follow them either. They also make the code feel "fragile" in my opinion. I find that I rarely need to go further than templates, personally.