top | item 42854554

(no title)

zimbatm | 1 year ago

This change would mark a turn in the language's evolution, as it would be the first implicit variable to be added to the language.

I'm not going to invoke the slippery slope argument, but what distinguishes Go from the pack is how explicit it is. It can make it more tedious to write, but also much easier to follow as a reader.

discuss

order

pjmlp|1 year ago

It is not more explicit than C, Pascal, JOVIAL and many other predating it for decades.

zemo|1 year ago

there's some precedent in the direction of adding predeclared identifiers for error handling: the identifier `error` was originally not predeclared, you had to import it from `io` (or maybe `os`?) and refer to it as `io.Error` everywhere.