Any idea when the 1.0 spec will be out?
Rémy Mouëza
ray.jay.ay.moueza at gmail.com
Thu Jun 22 12:09:40 PDT 2006
In article <e7c3hj$gf1$1 at digitaldaemon.com>, Lars Ivar Igesund says...
>
>sailormoontw wrote:
>
>> Hello:
>>
>> I have read the Sinbad forum, which it's a Ogre3D in D. The author thinks
>> with no 1.0 spec, it discourages them from making such a project. Ogre3D
>> is nice and currently is one of good free DirectX wrappers. If Ogre3D can
>> have the D version. I think it's a nice thing to the D community.
>>
>> And...I am just curious, after 5 years, when will the 1.0 of D be out??
>> Squirrel is a 2 years old language, and it already hits 2.1. And we
>> remember Perl, Perl has their spec fixed fast in earlier version while
>> Perl 6 is a bit slow.
>>
>> I am not sure what is left in the version 1.0, but like an ordinary
>> project it should have some timeline, or something left to do. 5 years
>> aren't short, and to tell the truth I have a feeling that other languages
>> would catch up by learning the merits of D, while D seems not final yet
>> without a formal 1.0 version.
>
>I disagree with Chris on the 1.0 part, Sinbad is quite possible to do, just
>a lot of work to get a 3D engine that is inherently designed with C++ in
>mind. I think new 3D engine designs based on what is possible in D, is a
>much more worthwhile thing to do, or at least port a engine that don't use
>multiple inheritance.
>
>--
>Lars Ivar Igesund
>blog at http://larsivi.net
>DSource & #D: larsivi
D can support a form of multiple inheritance, called "Mixin Inheritance". D's
mixins seems sometimes closer to traits than mixins used in Smalltalk.
# import std.stdio ;
# template A ( T )
# {
# class A : T
# {
# public :
# char [] message ;
# this ( char [] msg )
# {
# this.message = msg ;
# }
# }
# }
# template B ( T )
# {
# class B : T
# {
# public :
# this ( char [] msg ) { super ( msg ); }
#
# void printSomething ( char [] message )
# {
# writefln ( "super message : ", message );
# }
# }
# }
# template C ( T )
# {
# class C : T
# {
# public :
# this ( char [] msg ) { super ( msg ); }
#
# void consoleOutput ()
# {
#
# printSomething ( this.message );
# }
# }
# }
# // Create a type that is a C inheriting from both B and A
# // and rename it Multiple.
# alias C ! ( B ! ( A ! ( Object ) )) Multiple ;
# void main ()
# {
# auto instance = new Multiple ( "Hello World !" );
# instance.consoleOutput ();
# }
ray at Moonraker:~/dee/tmp$ ./minheritance
super message : Hello World !
It fakes multiple inheritance by creating parameterized subtypes, called mixins.
Then we instanciates an object of a "multiple" inherited class by selecting the
right inheritance order : C inherits from B wich inherits from A ( wich inherits
from the root of the Hierarchy ).
Thus, we can consider that porting an engine that uses multiple inheritance is
possible in theory.
I would like to see some little syntactic sugar, for mixin class :
# mixin class MixedIn : T ( U, V ) {}
That would be a shortcurt for :
# template MixedIn ( T, U, V )
# {
# class MixedIn : T ( U, V ) {}
# }
A 1.0 step would allow us not to dream too much about a specific feature that
won't come before the 2.0 release.
More information about the Digitalmars-d
mailing list