Hacker News new | past | comments | ask | show | jobs | submit login

It entirely depends on what kind of things you want to do. For example if you want to program microcontrollers with a modern language and 0 overhead over C then Nim is a great language to learn. Or if you want to write a web front-end and back-end in the same language that compiles to JS and C respectively then Nim is yet again a great language. Or if you just want to get into programming with macros to boost your productivity or make nice patterns in your code, then Nim is a great language. Or if you are just curious as to what else that is out there, then Nim is a great language.



I am more interested in having a great ecosystem and tooling. Probably I just want a better, faster and safer Java/C#/Go. All of these seem to be quite true with Rust.


Whilst there is a pretty well fleshed out stdlib, since Nim can compile to C, C++, Javascript, and even LLVM, you can use any library written for those languages/platforms. That's a huge mass of ecosystems that are natively accessible.

Nim's FFI is excellent and makes this very easy without worrying about the ABI (since you're compiling to the target languages).

There's also excellent interop with Python with embedding Python within Nim or calling Nim from Python.


This sounds like "wishful programming" without type safety (or needs writing types as libraries). The only place where I've seen this working well is in TypeScript and it has a massive community (and Microsoft) behind its back.

Currently I write backends in Rust and frontends in TypeScript and it works really, really well.


https://nim-lang.org/ -- says "statically typed" within the first 7 words of the main description of the language on the homepage... Most of the features happen through the type system (eg. functions are always top-level and looked up through UFCS), and it has generics and so on.


Nim is strongly, statically typed. It's very type safe.

Nim being able to compile to Javascript and, say, C means you can write your server and web client in the same language. This means you can share code between client and server which is particularly handy for having modules with type declarations imported by both for example, so you have a unified place to update them.

You also get to use Nim's strong type guarantees and metaprogramming when outputting Javascript. An example of why this is useful is generating say, RPC calls from a static JSON file that are automatically unified between server and client.


I would too love like c# ecosystem for nim but dont think that is possible especially cuz magic macro stuff. Thing i like about Nim is joy of writing and writing less and kinda started to love whitespaces, only cons i can see is there are not like 20 payed people who work full time for lang




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: