Things I like in Nim lang 1

There is an open-source programming language called Nim. It is a statically typed compiled language, looks a lot like python (small amount of syntax noise combined with spaces for identation/code blocks). Example from official site: import strformat type Person = object name: string age: Natural # Ensures the age is positive let people = [ Person(name: "John", age: 45), Person(name: "Kate", age: 30) ] for person in people: # Type-safe string interpolation, # evaluated at compile time. echo(fmt"{person.name} is {person.age} years old") A ‘bigger’ example, reading json from file and mapping it to an object: ...

January 5, 2021 · 3 min