why and how D can solve the next software crisis (was Re: Negative)
Kevin Bealer
Kevin_member at pathlink.com
Fri Mar 3 09:53:58 PST 2006
In article <du91ou$1rd4$1 at digitaldaemon.com>,
=?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= says...
>
>Kevin Bealer wrote:
>
>> 5. D is compile anywhere, run anywhere.
>>
>> This is not true yet; would be immense to accomplish unless the D compiler was
>> distributed with GCC. This is unfortunate, since the DMD compiler is so fast
>> and focused, but I think lack of platform portability is a killer for a compiler
>> (but not so much for an interpreter for some reason.)
>>
>> I see two possible futures in which D is ubiquitous, i.e. as much as Java now.
>>
>> FUTURE 1: The DMD compiler is used for fast development and to run D "scripts".
>> The high compile speed makes it perfect for scripting and rapid development on
>> the platforms it does support, and GCC's D compiler makes sure the rest of the
>> platforms don't have to go begging. Everyone gets fast development and every
>> platform can build binaries. But GCC would need to support D out of the box.
>
>I just don't see why GDC would have to be bundled with the rest of
>the GNU Compiler Collection in order for it to be used everywhere ?
>
>Yes, I know that the main GCC distribution also contains frontends for
>Objective C, Fortran, Java, and Ada. But those are more "different"... ?
>
>As it is now, most GCC-using systems support C and C++ "out of the box",
>and if you want an "odd" language like Pascal or D - you go download it:
>
>http://www.gnu-pascal.de/ (GNU Pascal Compiler, gpc)
>http://home.earthlink.net/~dvdfrdmn/d/ (GNU D Compiler, gdc)
>
>We *should* probably get GDC listed at http://gcc.gnu.org/frontends.html
>(putting it on the TODO list for next GDC release, along with new site)
There is no technical reason. But go to your boss and tell him you want to use
a new language. He'll be sceptical... Now tell him you need to build your own
patched version GCC to get a compiler for it...
>But then again most people don't want GDC, but want DMD on all platforms
>and only want a Digital-Mars-supported graphical interface such as DWT ?
>
>And there isn't much anyone but Walter himself can do about those, IMHO.
>(I don't have time for both, so I'll worry about the GNU / wx versions)
DMD is much better, but since DMD produces machine code directly, it seems
likely that IA64, and even moreso, every non-intel version is going to require a
big chunk of Walter's time. This seems non-scalable right now... maybe the
code for DMD is flexible enough to make this happen quickly, but I don't know
enough.... correct me if I'm wrong, please.
>> FUTURE 2: The D compiler occupies a niche like Perl or Python, Tcl, etc, where
>> there is one "blessed" compiler, but it still gets installed by everyone. All
>> of these seem to be scripting languages (why is that??). The only way this can
>> happen (I think) is if D supports every platform (very very much work, I
>> think...) or can at least produce and run some kind of bytecode.
>>
>> [ D in bytecode sounds tricky, but I don't know enough to know how many genuine
>> obstacles there are. I would think the "Java subset" of D could be done this
>> way, but... ]
>
>Color me sceptic, but I'm not too sure about "D the scripting language".
>It just doesn't seem to be in the nature of the language, to do that...
I think the main feature scripting languages have that make them so great in
their niche is that container classes, regexes, and a fair amount of system call
oriented syntax (i.e. backticks to run commands) are built right in.
D doesn't have all of this yet, but it's far ahead of C and C++ here. I think
it can handle the "scripty" end of the application spectrum better than most
other compiled languages.
It may never have bytecode, but users don't actually care about that if
compile/link is fast -- which seems to be true for dmd but not necessarily gdc.
The dmd compile feels faster than just starting the Java interpreter. I haven't
benchmarked it though.
>I'd love to be wrong, by someone providing a .NET or Parrot backend :-)
>But DMDScript is probably more likely to fill the DM scripting needs ?
>
>--anders
More information about the Digitalmars-d
mailing list