5 ms·
I also don't get why the for-loop uses a "range" keyword at all, isn't that what typing is for, can't it just figure out that the type is enumerable? I like mo
by tjholowaychuk 12y ago
I also don't get why the for-loop uses a "range" keyword at all, isn't that what typing is for, can't it just figure out that the type is enumerable?
I like most of Go so far, but interface{} is possibly the ugliest artifact of a programming language that I've seen, next to pretty much all of c++
Rust and Go should have a baby
- jamesmiller5 12y agoThere is a subtle yet key difference between range and for. Ranges will only start execution on input of known size and guarantee termination. Regular for loops do not require a terminating state.
- burntsushi 12y ago> Ranges will only start execution on input of known size and guarantee termination. `range` can be used to receive values on a channel, which is certainly not a known size and doesn't have guaranteed termination.
- Shorel 12y agoMay be D will interest you.