Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

CLU had for loops with iterators (generators) and yield in the mid–late 1970s [0]. The Icon programming language around the same time had similar generator features [1] (with yield spelled “suspend”). Ada (1983) also had such features I believe. These weren’t completely unknown language features.

[0] https://publications.csail.mit.edu/lcs/pubs/pdf/MIT-LCS-TR-2...

[1] https://dl.acm.org/doi/pdf/10.1145/800055.802034



Ada didn’t have generators back then and still doesn’t ( I think its being considered for inclusion soon ). But it had all the other features.


A task type with an entry is effectively a generator.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: