4 ms·
I 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 f
by xyproto 3y ago
I 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)#