D vs Java
Don Clugston
dac at nospam.com.au
Wed Mar 22 07:44:09 PST 2006
pragma wrote:
> In article <dvr64c$6sv$1 at digitaldaemon.com>, kris says...
>> Kyle Furlong wrote:
>>> kris wrote:
>>>
>>>> Did anyone mention DDL? Given that it would make D the only compiled
>>>> language I've heard of with a runtime link-loader, that would seem to
>>>> have some bearing?
>>>
>>> Just what I was thinking. Can DDL make compile once, run everywhere
>>> possible? (assuming that is an idiom we would like to support)
>> No, DDL does no such thing. Nor is it intended to (instead, it's
>> deliberately machine-architecture specific).
>>
>> Functionality exposed by DDL is roughly the equivalent of a Java
>> class-loader, but for pre-optimized native object-code exposing a D
>> callable interface. This is a highly unusual attribute for native code
>> runtime, and is (in my opinion) one of the most important assets for the
>> D language. DDL also has the potential to support full reflection.
>
> I couldn't have said it better myself. :)
>
> A pleasant side-effect from all this is that it may help increase code-mobility
> across the windows/linux/mac divide, for any dynamic D binaries (x86 object
> files that comply with the D ABI) that are free from OS-specific code.
> Provided, that's just theory for now, but it should be possible. While that's
> not "run-everywhere", it gets you far enough to make certain styles of plugin
> architectures very possible.
>
> - EricAnderton at yahoo
In digitalmars.com digitalmars.D:35128, Walter said of the difference in
reals between Linux and Windows:
> > pragma's DDL lets you (to some extent) mix Linux and Windows .objs.
> > Eventually, we may need some way to deal with the different padding.
I think it's a pipe dream to expect to be able to mix obj files between
operating systems. The 96 bit thing is far from the only difference.
Now, he's quite knowledgeable, but I'd love to prove him wrong on this
one. I find it hard to believe that it would be impossible. I guess the
question is, will the subset of functionality that works be sufficient
to be useful? I guess we won't know until the ELF side is working.
"Compile once, run everywhere that matters"? (Win, Linux, Intel Mac).
Exception handling (especially Windows SEH) might be a big problem,
maybe a show stopper?
More information about the Digitalmars-d
mailing list