Why I chose D over Ada and Eiffel
Jacob Carlborg
doob at me.com
Tue Aug 20 00:08:08 PDT 2013
On 2013-08-19 22:18, Ramon wrote:
> An added major plus is D's bluntly straight interface to C. And a vital
> one, too, because let's face it, not being one of the major players in
> languages basically means to either not have a whole lot of major and
> important libraries or else to (usually painfully) bind them. D offers
> an excellent solution and gives me the peace of mind to not paranoically
> care about *every* important library coming with it.
You can use this tool to automatically generate bindings to C libraries:
https://github.com/jacob-carlborg/dstep
> Criticism:
>
> OK, I'm biased and spoiled by Eiffel but not having multiple inheritance
> is a major minus with me. D seems to compensate quite nicely by
> supporting interfaces. But: I'd like more documentation on that. "Go and
> read at wikipedia" just doesn't cut it. Please, kindly, work on some
> extensive documentation on that.
You can get quite close with interfaces and templates:
interface Foo
{
void foo ();
}
template FooTrait
{
void foo (); { writeln("foo"); }
}
class A : Foo
{
mixin FooTrait;
}
class B
{
void b () { }
}
class Bar : B, Foo
{
mixin FooTrait;
}
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list