[Fwd: Re: [go-nuts] Re: Generics false dichotomy]

Jesse Phillips Jesse.K.Phillips+D at gmail.com
Fri Feb 21 18:52:35 PST 2014


On Saturday, 22 February 2014 at 01:39:28 UTC, deadalnix wrote:
> On Saturday, 22 February 2014 at 01:36:48 UTC, Walter Bright 
> wrote:
>> On 2/21/2014 5:27 PM, deadalnix wrote:
>>> That makes me sad that D has Java's object model rather than 
>>> let's say, scala's
>>> (which work with traits/interfaces).
>>
>> D's object model works with interfaces.
>
> I'm talking about this:
> http://joelabrahamsson.com/learning-scala-part-seven-traits/

https://gist.github.com/JesseKPhillips/9147869

Two notes,

Creating an array required casting the first item to the common 
type.

D doesn't let you creating a new object and implement an 
interface. It seems that std.typecons is getting tripped up on 
the final method fly() so it can't be used either.


More information about the Digitalmars-d mailing list