3 ms·
Go relies on naming for everything, which pushes information density into naming where every symbol could have special meaning and special behavior too [1], but
by zzzcpan 7y ago
Go relies on naming for everything, which pushes information density into naming where every symbol could have special meaning and special behavior too [1], but not consistent, universal or shaped and enforced by the compiler. It means more code to understand and write while less language syntax to learn. Other approach is to have more syntax, which can be more consistent, universal, flexible and therefore require less code to understand and write. Information density doesn't really change it's just syntax is more useful in more cases so it can replace a lot more specially crafted library functions.
[1] https://golang.org/pkg/regexp/ https://golang.org/pkg/regexp/
- nrdvana 7y agoI hadn't thought about it that way before, but I like and agree with this analysis. While method names can contain all the information, it requires more words and you end up with a Java-style mess thatContainsTheWholeAlgorithmInTheName. The punctuation is almost like having a bunch of one-cahracter standard names that everyone understands without having to agree on standard conventions.