When D is not nice

superdan super at dan.org
Sun Jul 6 15:21:14 PDT 2008


Frank Benoit Wrote:

> String concatenation in Java:
> 
> "abc " + a + " bla";
> 
> where a is an interface ref.
> 
> Ported to D, this look like this:
> 
> "abc " ~ (cast(Object)a).toString ~ " bla";
> 
> This are 3 steps more:
> 1.) explicit cast to Object (interface/class compatibility!)
> 2.) explicit call to toString
> 3.) put additional parentheses
> 
> I would be happy if we could remove all three of this annoying points.

so interfaces are not Objects. actually they have no common ancestor. that's pretty much fuckshat-up. damn. 



More information about the Digitalmars-d mailing list