DEV Community

Discussion on: How to contribute to Nim language?

Collapse
 
mellen profile image
Matt Ellen • Edited

What is the inspiration behind Nim?

For example, Javascript's inspiration was "QUICK! WE NEED A SCRIPTING LANGUAGE! LIKE YESTERDAY!", python was inspired by minimalism, c was inspired by a need to make assembler comprehensible, and c++ was inspired by a misunderstanding of what object oriented programming is. #sorrynotsorry

What drove people to come up with this new language? From the site all I can gather is the someone liked a bunch of other languages and picked what they think of as the good bits and put them into another language. Is there more to it?

Collapse
 
ringabout profile image
ringabout • Edited

You could see what the creator of the language said
157.245.209.254/andreas-rumpf-on-c...

quote reddit comments: old.reddit.com/r/programming/comme...

What Nim language is?
One language to rule them all
Good for everything, from shell scripting to web front and backend, to machine learning, high-performance computing (HPC), and embedded.
Type system: strong static typing, nice generics, concepts, and type classes
Performance: matches C and C++, always gives control to the programmer
Portability: compiles to C, C++, and Javascript
Native use of all libraries in target languages (no ABI issues) + really nice FFI
Single (tiny) executable with no dependencies
Write server/client in the same language and share code between front/back end
Linux, Windows, and macOS
Iterating: Very fast compile speeds
Top-tier metaprogramming
Hygienic AST Macros a core part of the language, very flexible syntax
Runs a VM of Nim at compile time giving you most of the language (bar pointers) to generate code or run procedures and store them as const
e.g. async implemented just with macros, doesn't need special language support
e.g. can automate building types and code from file data at compile time

Collapse
 
mellen profile image
Matt Ellen

Thanks!