3 ms·
Let me add in autocomplete and, if applicable, import management. Also... > Higher order functions ... no mainstream languages that don’t do this. Go doesn't
by TheDong 11y ago
Let me add in autocomplete and, if applicable, import management.
Also...
> Higher order functions ... no mainstream languages that don’t do this.
Go doesn't, vehemently so. A higher order function, such as map, must be generic, and Go simply doesn't see the need for that. Write more for loops :(
- kwhitefoot 11y ago> autocomplete Isn't that an editor's job?
- TheDong 11y agoIt is a shared responsibility. The language must allow you to create a sane in-memory representation of code, including partial code, and an autocomplete engine has to be created, taking advantage of that.
- garfij 11y ago> Go doesn't, vehemently so. We seem to have a different notion of what a higher order function is. My understanding is that a higher order function is one that takes one or more functions as arguments, or, returns one or more functions as a result. Go happily supports this.
- TheDong 11y agoThe author of the article specifically calls out map and reduce. Go does not support higher order functions in nearly the same way as functional languages.