A question about system language

H. S. Teoh hsteoh at quickfur.ath.cx
Fri Aug 2 17:05:16 PDT 2013


On Sat, Aug 03, 2013 at 01:51:17AM +0200, SteveGuo wrote:
> >
> >Why is it a bad thing for it to be a systems language? :)
> >
> >
> >T
> 
> I'm just a little bit worry about, when new os borns, D has to
> support it, time goes by, D will become another overstuffed C++?

C++'s problems aren't all because of OS compatibility. There are many
language-level issues and design decisions like backward-compatibility
with C that, although it helped adoption in the short term, greatly hurt
the language in the long term. C++ had a lot of good ideas, but backward
compatibility with C became a big obstacle to doing things in a clean
way. As a result, you have bandages upon bandages upon workarounds, and
eventually C++ became to huge that I don't know if even Stroustroup
himself knows the entire language without looking it up in the specs.

Java also supports many OSes, but that hasn't affected it very much,
mainly because Java welds the hood shut so that it's very hard for you
to actually interact with the host OS. This causes a lot of performance
issues which cannot be fixed without breaking portability (by using JNI)
or until an interfacing library has been officially adopted and
implemented on your target OS.

In D, you can freely interact with your host OS if you so wish, but you
can also use libraries that abstract away the details of the OS so that
the same code can run anywhere (in theory, anyway -- even Java hasn't
really fulfilled the promise of "write once, run anywhere" -- it's more
like "write once, debug everywhere"). D is all about choice. :)


T

-- 
Music critic: "That's an imitation fugue!"


More information about the Digitalmars-d mailing list