4 ms·
Including null in golang was a mistake, but that decision is a lot more defensible than the decision to call it nil. Seriously, can we just pick 1 name and stic
by Floegipoky 6y ago
Including null in golang was a mistake, but that decision is a lot more defensible than the decision to call it nil. Seriously, can we just pick 1 name and stick to it?
- sugarkjube 6y agoiirc nil has its roots in the pascal/modula/oberon family of programming languages which one of the go designers had quite a background in.
- hypertele-Xii 6y agonil is Latin. null is English/French. They both mean the same thing - "nothing". As long as people speak more than one language across the globe, there will be multiple words for the same things. ...Get over it?
- Floegipoky 6y ago1. I can't think of any other keyword in golang that comes from Latin. It's a dead language. 2. The meaning of null is well-understood by the CS community. The meaning of nil is not; it seems to be redefined by each language that includes it. For example, nil is the empty list in Scala.
- Smaug123 6y ago"interface", "import", "struct", "constant", "defer", "func", "select" are all directly Latin words, truncations of Latin words, or obvious portmanteaus of Latin words. "default" is ultimately from Latin but a bit less immediately so. This list is by no means exhaustive.
- hypertele-Xii 6y ago> I can't think of any other keyword in golang that comes from Latin. Yet you probably know more Latin from programming than you think you do. Did you know that integer is Latin? > It's a dead language. "In fields as varied as mathematics, physics, astronomy, medicine, pharmacy, biology, and philosophy Latin still provides internationally accepted names of concepts, forces, objects, and organisms in the natural world."
- philosopher1234 6y agoIn short: who cares?
- baby 6y agothe French word is "nul" btw
- baby 6y agoIt sounds like a comment that someone would make after spending a day playing around with Golang, spend a week writing Golang and you won't care about how it's called.