Hacker News new | ask | show | jobs
by jkoudys 849 days ago
I really enjoy the comprehension syntax too, which is a bit odd at first. But it lets you think about the typical map/filter approach you'd take in JS, PHP, etc. to build a list OR an iterator in almost the same way. I started to love lazy evaluation once I got big into rust, but writing all that stuff out in vanilla typescript is hard. It's wild how much JS is in the world that builds and allocates giant datasets for what all could just be a little iterator.