Generics for Go
Generics for Go
Posted Jul 1, 2020 19:13 UTC (Wed) by acarno (subscriber, #123476)Parent article: Generics for Go
https://www.adaic.org/resources/add_content/standards/05r...
Posted Jul 1, 2020 19:53 UTC (Wed)
by dvdeug (guest, #10998)
[Link] (2 responses)
Personally, I've worked with Ada generics. The Ada type system added complexities in places that don't seem to have wins in retrospect, and Ada generics reflect that. They don't have the sheer power that C++ templates have, or the usual elegance of Java. I'd be interested to see languages from a universe where Ada was more successful and modern languages stuck more to its design principles, but in any case, Ada generics were the first major generics implementation, and it shows.
Posted Jul 8, 2020 6:58 UTC (Wed)
by ncm (guest, #165)
[Link] (1 responses)
C++ generics do owe a lot to ML (not "machine learning"; there was a language ML that also influenced Haskell). Java generics are extremely limited, and their backward compatibility means they offer no performance improvement over older mechanisms.
Posted Jul 16, 2020 10:17 UTC (Thu)
by jch (guest, #51929)
[Link]
Why in the past tense? ML is doing fine, the dialect with the most active community would appear to be OCaml, https://ocaml.org/ . (It looks to me like ML was an important inspiration for Rust.)
Posted Jul 2, 2020 8:25 UTC (Thu)
by k3ninho (subscriber, #50375)
[Link]
K3n.
1: https://arxiv.org/pdf/2005.11710.pdf
Generics for Go
Generics for Go
Generics for Go
Generics for Go
Read the "Featherweight Go" journal article [1] and its parent, "Featherweight Java"[2]. I think Rob Pike looked and though Featherweight Java more relevant because of the user-facing side of Go is more like the C++/C#/Java kind of object orientation than the approach taken by Ada. You should be heartened that both Featherweight approaches prove (rather than merely providing) type safety.
2: https://dl.acm.org/doi/10.1145/503502.503505