Hacker News new | ask | show | jobs
by haxscramper 1706 days ago
I can't remember exact place where I've seen this discussion (I think it was on the nim IRC), but if I recall correctly, the original line of thought with nim was to take C (because fast/compiled/available-everywhere) and LISP (because flexible/extensible/good-ideas) and add more syntax sugar, so that user would not have to reimplement most of the syntax from scratch (using reader macros/special functions and so on).

There are of course a lot of other languages that influenced the syntax and semantics (like Ada, python, C++ and so on), and I omitted a huge number of extra considerations.

2 comments

Indeed, in fact the original line of thought was[1]:

> [combining] Lisp's power with Python's readability and C's performance.

I'd say Nim still satisfies this very well.

1 - https://web.archive.org/web/20110704041631/http://force7.de/...

Interesting, I think Julia was close to that too:

> We want a language that's open source, with a liberal license. We want the speed of C with the dynamism of Ruby. We want a language that's homoiconic, with true macros like Lisp, but with obvious, familiar mathematical notation like Matlab. We want something as usable for general programming as Python, as easy for statistics as R, as natural for string processing as Perl, as powerful for linear algebra as Matlab, as good at gluing programs together as the shell. Something that is dirt simple to learn, yet keeps the most serious hackers happy. We want it interactive and we want it compiled.

https://julialang.org/blog/2012/02/why-we-created-julia/

Interesting. No mention of Pascal or its descendants, specifically Modula 2 or 3? From what I understood, that's where Nim got its fast compilation and modules, like OCaml.
If you ignore the whitespace sensitivity, Nim's syntax is actually more similar to Pascal than to Python.