News for hackers. Stuff that matters.
Re:Why people are angry over Go 1.23 Iterators by gyanreyer on Monday June 17, 2024 @10:01PM (#40713374)
I like iterators in JavaScript well enough. I understand the syntax of this just fine, it doesn't seem that ridiculous. It's definitely a little less simple than Go usually tends to be, but it's certainly not impenetrable. And you don't have to use it. I personally probably won't use it but I don't care that it's there.
Re:Why people are angry over Go 1.23 Iterators by frizlab on Monday June 17, 2024 @10:38PM (#40713562)
You don’t have to use it is probably the most common worst argument ever. The mere existence of the construction means it _will_ be used and you will have to know about it and eventually use it.
Re:Why people are angry over Go 1.23 Iterators by skldj28d2 on Monday June 17, 2024 @10:42PM (#40713584)
They'll be used primarily by library authors but most people will end up consuming them a lot. They'll eliminate a lot of unnecessary intermediate slice allocations.