Opportunity
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Tue Apr 9 08:50:11 PDT 2013
On 4/9/13 4:17 AM, Russel Winder wrote:
> On Mon, 2013-04-08 at 23:51 +0200, Paulo Pinto wrote:
> […]
>> Lets not forget the lack of generics, the religious view against dynamic
>> linking and errors for unused variables and imports.
>
> OK so every language has it's religious side: Go's obsession for static
> linking is indeed a problem and cgo is not really the solution.
I think this thread has collected a good amount of arguments (of the
devil's advocate style) you might also encounter from informed attendees
during and after your talk.
I expect arguments against D to be mainly based on completeness of
definition, quality of implementation, and of course current adoption.
> I have yet to find anyone who can tell me why Go must have generics with
> a cogent argument that makes sense to me. OK so C++ has generics;
> templates, how wonderful. Java has generics, and type erasure, great.
> Scala, Ceylon and Kotlin have huge infrastructure to reify generics on a
> platform with unreified generics. At least C# got that right. Why is the
> Go idea of total separation of state and behaviour not a good
> experiment, after all JavaScript, Python, etc. have shown this works
> even without static type checking.
I think one of the less savory things the Go culture has done is to
compromise the notion that generics are desirable in that language, to
the extent that n00b posts asking about it are met with derision.
Lack of generics makes it very tenuous to do meaningful work on
algorithms and their associated data structures. To compound the matter,
Go itself doesn't follow its own preaching (thou shall shun generics and
use interfaces throughout) for its own essential data structures
(arrays, associative arrays, and channels) - all of which are generic in
ways unattainable to client code. You can only go this far by claiming
two data structures are enough and algorithms based on map/reduce are
unneeded because there are loops.
I have some material for an article entitled "Why Go is not my favorite
programming language". I decided in the end to cease work on that
because it would be too controversial.
Andrei
More information about the Digitalmars-d
mailing list