Re: [go-nuts] Bets approach for test helper packages within same project

2023-08-06 Thread josvazg
Interesting! Thanks! I was assuming wrongly the module was the unit of compilation. If any package not imported by production code is not included, then that also means that build tags are not necessary for the integration and end to end test folders. Correct? Any pointers on where can I read

Re: [go-nuts] Why does Go (so far) not have support for generators/ iterators for custom types ?

2023-08-06 Thread 'Axel Wagner' via golang-nuts
Small corrections: 1. in the first sentence, add an "early days Go" 2. In the second sentence, "now we do have *generics*", not iterators. On Sun, Aug 6, 2023 at 11:35 AM Axel Wagner wrote: > For one, Go did not have generic types or functions, which really limits > the usefulness (and abilities

Re: [go-nuts] Why does Go (so far) not have support for generators/ iterators for custom types ?

2023-08-06 Thread 'Axel Wagner' via golang-nuts
For one, Go did not have generic types or functions, which really limits the usefulness (and abilities to write) custom iterators in Go. Now we do have iterators, but it turns out there still are a lot of subtle Go-specific issues with how to support custom iterator types, which to be honest are to

[go-nuts] Why does Go (so far) not have support for generators/ iterators for custom types ?

2023-08-06 Thread Serge Hulne
Why does Go (so far) not have support for generators/ iterators for custom types ? I wrote this workaround: https://github.com/serge-hulne/go_iter But I was wondering what lead to the idea of leaving iterators out in the early days of the design of Go. What simplification of the language was e