D vs Go in real life

Jesse Phillips Jesse.K.Phillips+D at gmail.com
Wed Nov 6 17:45:46 PST 2013


On Wednesday, 6 November 2013 at 20:52:41 UTC, Kagamin wrote:
> On Wednesday, 6 November 2013 at 15:34:54 UTC, Jesse Phillips 
> wrote:
>> 1. http://blog.jessta.id.au/2012/06/gos-sort-package.html
>
> Hmm... if sort.Sort accepts a sortable interface, they could 
> define those 3 methods for respective arrays so that they would 
> satisfy the interface, and sort.Sort would accept them 
> transparently. Well, if go allows extending array's interface.

It does not. A specific type must be created and the functions 
defined for it. Was one of the first WTFs I hit. It doesn't solve 
the lack of generics problem, which is much more important.


More information about the Digitalmars-d mailing list