4 ms·
Actually, no, I've never used C# except for a few minutes and only one time. I have more experience with the syntax of Scala and Rust. Between the two, I found
by jesserayadkins2 10y ago
Actually, no, I've never used C# except for a few minutes and only one time. I have more experience with the syntax of Scala and Rust. Between the two, I found Rust's more appealing. I like that enums serve a single purpose and can't be inherited.
Currently, the best you can get for iteration of Lists and Hashes is to do each-ing the way you'd go about it in Ruby, except that the language currently lacks iterators.
That's not to say I don't want iterators. But I've spent a huge amount of time of this release in making sure that all of the built-in classes get dynaloaded so that memory usage stays low. Now that everything's getting dynaloaded properly, I've less of a problem with doing iterators.
- stevedonovan 10y agoVery cool - haven't come across a fun new language for a while. When thinking about iterators, think about coroutines a la Lua. Otherwise you're going to get yield-with-serious-restrictions.
- DanWaterworth 10y agoWhen I was adding for each style loops to my language, plastic [1], I just opted for 'you can iterate over any expression that produces a coroutine'. It shouldn't cause any problems a tracing jit can't fix and it's super convenient. [1] https://github.com/DanielWaterworth/plastic https://github.com/DanielWaterworth/plastic