Re:Shaving 40% Off Google’s B-Tree Implementation with Go Ge...
by Pannoniae on Tuesday September 19, 2023 @10:31PM
(#37579775)
I didn't do it properly on purpose, because that wouldn't have been fair towards Go. Ultimately, many things which aren't even common yet today have already existed in the 70s.
I have picked 20 years specifically since it was around 2003-2005 when Java and C# got generics. Obviously, they were also more than 20 years late but I compared it to mainstream languages people are more likely to know about or more likely to compare it with.
I wanted to be fair and compare Go to some other mainstream languages which are big today, not niche ones.
Re:Shaving 40% Off Google’s B-Tree Implementation with Go Ge...
by fooster on Tuesday September 19, 2023 @11:29PM
(#37580091)
It’s so frustrating that every post on go brings out the same tired tropes. It just ruins any sensible discussion on any changes. Why do you do it? Are you trying to troll and actively make HN a worse place because that is for me what you are doing.
If you don’t like go don’t read the posts it’s not hard. Just stop.
If you want to hate on Go, do it properly: https://en.wikipedia.org/wiki/Generic_programming says
> Generic programming is a style of computer programming in which algorithms are written in terms of data types to-be-specified-later that are then instantiated when needed for specific types provided as parameters. This approach, pioneered by the ML programming language in 1973,[1][2] permits writing common functions or types that differ only in the set of types on which they operate when used, thus reducing duplicate code.
> Generics was introduced to the main-stream programming with Ada in 1977 and then with templates in C++ it became part of the repertoire of professional library design. The techniques were further improved and parameterized types were introduced in the influential 1994 book Design Patterns.[3]
If you go with 1973, you get Go being behind the times by a nice round 50 years. If you go with the latest date mentioned, 1994, you still get almost 30 years.
The ML family of languages lives on in eg Haskell and OCaml these days. But Ada was perhaps more mainstream at the time, and 1977 gives you a nice 46 years to roast Go with.
But in any case, while it is tempting to mock Go and its inventors, we should applaud them when they do recognize their mistakes and fix them. Better having generics late than never!
(Btw, from what I can tell by reading their earlier justifications, it seems that the problem was that they only really knew the mess that C++ templates are, and thought all generics were like that. If the choice is between C++ style templates and no generics at all, I can at least understand where they were coming from with their reluctance.
However, given that they must have heard of Java, I'm not quite sure why they thought generics must inevitably be so complicated.
In the end, the Go people wisely got Phil Wadler and friends, who are more at home in the functional programming community, to help them out with the design.)