3 ms·
Are the `-option` thing in Go CLI apps and method capitalization (`myobject.GetStuff()`) other examples of these idiosyncraticies?
by ducktective 4y ago
Are the `-option` thing in Go CLI apps and method capitalization (`myobject.GetStuff()`) other examples of these idiosyncraticies?
- coldtea 4y agoThe -option I'd say yes. Although this is vintage UNIX style behavior, in 2009, when Golang emerged, it should have picked GNU-style. No reason except idiosyncrasy or nostalgia to go with single dash. For method capitalization, I'd say no, as this is the case in any other popular languages too (C# to name but one).
- masklinn 4y agoThe capitalisation itself isn’t idiosyncratic (though it seems uncommon in the unix world), however that having a semantic impact is rather rare. Not completely unique (e.g. variables v symbols in erlang, concrete type v generic placeholder in haskell) but really rare, and usually the capitalisation isn’t a switchable thing, it’s a very fixed meaning.