4 ms·
Whenever I see a new project my first question is always "why?". From the FAQ: Why yet another programming language? Nim is one of the very few programma
by choward 10y ago
Whenever I see a new project my first question is always "why?".
From the FAQ:
Why yet another programming language?
Nim is one of the very few programmable statically typed languages, and one of the even fewer that produces native binaries that require no runtime or interpreter.
That's it? That doesn't answer the question at all. In fact, it makes it even less clear. All it says it that there are other programming languages that have similar features. Who cares?
- Varriount 10y agoWell, if you look at the front page, you'll also see: High-performance garbage-collected language Compiles to C, C++ or JavaScript Produces dependency-free binaries Runs on Windows, macOS, Linux, and more And of course, the "Features" button right under the text leads to https://nim-lang.org/features.html https://nim-lang.org/features.html
- kem 10y agoNim looks great, but I have to admit after looking through the website it's unclear to me why I would use this over similar alternatives. In particular, why Nim over Go (or why Go over Nim)? Is the Python's established presence and resource base (not trivial at all) the only reason one would prefer it over Nim?
- jjnoakes 10y agoGo doesn't support as many platforms as Nim, for one. And Go doesn't give you access to as many system libraries, for a second. There's cgo, of course, but that has its own can of worms. I hear the type systems are fairly different as well, which is important to some.
- nimmer 10y agoNim is programmable with macros and templates and very flexible. Go is not at all.
- MichaelGG 10y agoHow does it accomplish tracing GC without a runtime?
- Varriount 10y agoIt doesn't have a tracing GC (or at least, the primary portion isn't tracing). The garbage collector is outlined at https://nim-lang.org/docs/gc.html https://nim-lang.org/docs/gc.html
- MichaelGG 10y agoIt says it has to scan the entire threadlocal heap with mark and sweep. What am I missing? Anyways I'm sorta being pedantic that it obviously has some sort of runtime. Maybe they meant to say not a runtime like a full VM ala Java?
- vinceguidry 10y agoThe whole language compiles to C, C++, or Javascript. It presumably uses whatever runtime the compiled-to language provides.
- MichaelGG 10y agoWell C doesn't ship with the GC described, so it must include some additional runtime beyond the C library.
- deleted 10y ago[deleted]
- dkarapetyan 10y ago> The GC is only triggered in a memory allocation operation. It is not triggered by some timer and does not run in a background thread. I think this is what D does as well. This means you have to be mindful of what you're doing and if you want few pauses then you need to perform all your allocations ahead of time or disable it entirely in certain sections.
- uapkrr 10y agoprogrammable statically typed languages programmable refers to nim's metaprogramming capabilities.
- cylinder714 10y agoAw, what could be more appropriate for a site named "Hacker News" than a link to a new programming language?