DEV Community

Discussion on: TIL: Objects in Nim

Collapse
 
idkjs profile image
Alain

So what is NIM about? A teaching language? I didn't find an answer in the top 10 results on DuckDuckGo! I guess the question is, what drew you to it?

Collapse
 
sophiabrandt profile image
Sophia Brandt

It's a systems programming language. The syntax is very similar to Python, but it's statically compiled to stand-alone binary (per default C.).
Thus, it's pretty fast.

I was thinking about learning Rust, but there are a few things that speak against Rust (for me):

  • big language (lots of stuff to learn just from the standard library)
  • memory management via borrow checkers (hard to learn, I assume)
  • verbose syntax

What I like about Nim:

  • white-space syntax
  • over 10 years old (a very small core team, but the language isn't going anywhere)
  • statically compiled to a stand-alone binary
  • "modern" language features: iterators, async/await
  • macro system (the language itself is not that big, but you can extend it yourself with templates, and write your own DSL)
  • garbage collected (the team works on a way of managing memory manually)
Collapse
 
idkjs profile image
Alain

Have you found any good example repos you were able to refer to?

Thread Thread
 
sophiabrandt profile image
Sophia Brandt

I have the book "Nim in Action", here's the code for the projects:
github.com/dom96/nim-in-action-code