One year of Go
jfd
jfd at nospam.com
Fri Nov 12 04:41:34 PST 2010
== Quote from Andrei Alexandrescu (SeeWebsiteForEmail at erdani.org)'s article
>> eaturbrainz
>> Back in the day I was writing a kernel, and having to
>> rewrite queues for every single type of thing I wanted
>> to queue, or use type-casts to enforce strong typing
>> of queue elements at runtime, was annoying as fuck.
> http://www.reddit.com/r/programming/comments/e49ta/go_one_year_ago_today/
> Andrei
eaturbrainz's problem is what convinced me of the true value of generics. I had a
similar experience: In C, I had to rewrite a hashtable for every data type, so I
ended up with workarounds using struct with pointers to "worker functions", like a
kind of poor man's "interface". Generics is far more elegant.
I may be oversimplifying it, but it seems that the "interface" approach that I
consider to be a "workaround" is what Go is proposing to us.
I'm glad that D has true generics, and a more robust one at that. It "fixes" a
lot of "issues" of C++ templates, and is more readable, less fragile, etc., etc...
than C++. I applaud Walter for that. :)
Thank you for the post!
More information about the Digitalmars-d
mailing list