A look at the D programming language by Ferdynand Górski

Chris wendlec at tcd.ie
Tue Jan 15 02:22:19 PST 2013


On Tuesday, 15 January 2013 at 06:30:33 UTC, Rob T wrote:

> A really important advantage that scripting languages provides 
> that D does not currently provide, is direct runtime 
> interpretation of the language. This is very important for the 
> use cases of script languages such as Ruby and PHP, because 
> often they are used for coding and testing on the fly, ie., 
> used in an environment that requires frequent changes with 
> almost instant feedback.

This is true. On the other hand, if you do quick and dirty stuff 
(count the frequency of certain words, parse data files etc.), 
the compilation time is not really an issue, and due to 
unnecessarily ugly syntax (PHP, Perl) or indentation (t)errors 
(Python) you sometimes lose time, or cannot just copy and paste 
snippets to test them without checking your spaces.

[...]

> A language such as C++ seems like a bad fit for a scripting 
> language because of it's complexity and the difficultly with 
> parsing through it. Also a scripted language probably should 
> not have low level access that is provided by languages such as 
> D and C/C++.
>
> --rt

Why not? In my experience small scripts often turn into bigger 
programs and sooner or later you need some sort of low level 
features. Then you have to write modules in C/C++ and use Swig or 
something to integrate them. That's why I prefer D, because you 
can get the whole shebang _if necessary_. There are also 
copyright issues. If you deliver a Python program, anyone could 
rip it, even if you compile it to byte code. If you distribute 
native executables, it's harder to rip your program. In general, 
I find scripting languages less useful for projects that (might) 
develop into something bigger. Now that I come to think of it, 
scripting languages are inherently "quick and dirty", that's why 
they are not really scalable (think of the class system in Python 
and Lua, not the real deal).



More information about the Digitalmars-d-announce mailing list