3 ms·
> I wish the article would also mention Nim, a Python-like language that compiles to native, and compare it to Mojo. I would not say that Nim is “a Python-like
by ziotom78 3y ago
> I wish the article would also mention Nim, a Python-like language that compiles to native, and compare it to Mojo.
I would not say that Nim is “a Python-like language”. The only significant similarity is in the usage of indentation instead of curly brackets. To me, it is much more similar to Pascal/Ada/Oberon, but less verbose.
- xyproto 3y agoI have not programmed much in Nim, and I think you are mostly right, but Nim also have keywords and concepts not found in Pascal/Ada/Oberon that clearly comes from Python, like "yield" and iterators: iterator iota(n: int): int = for i in 0..<n: yield i
- Erwin 3y agoI think the 1977 Icon language is where the generator concept originated. It had many other cool features I have not seen in other languages since: https://en.wikipedia.org/wiki/Icon_(programming_language)# https://en.wikipedia.org/wiki/Icon_(programming_language)#