too early for D2 and too late for D1

dsimcha dsimcha at yahoo.com
Wed May 4 05:47:00 PDT 2011


On 5/4/2011 3:13 AM, Russel Winder wrote:
> On Tue, 2011-05-03 at 23:14 -0400, dsimcha wrote:
> [ . . . ]
>> BTW, yes, I know Java and C# can be pretty fast sometimes.  The problem
>> is that they both have abstractions you can't get beneath in your most
>> performance-critical code.  If you're writing code from scratch (as
>> opposed to something that would benefit from tons of libraries that D
>> doesn't have yet), I also think they're not as productive because they
>> don't make metaprogramming easy.
>
> I don't know about C#/CLR (no experience of knowledge) but for
> Groovy/Scala/Java/Clojure on the JVM, and indeed Python on the PVM, if
> there is a small piece of code that is truly performance critical and
> you can't get the JVM/JIT to make it fast enough and native code can
> then you call out to C or C++ -- real performance data not speculation
> is required here though.  Of course this is far, far easier with Python.
> Much of the "need flexibility"/"developer time is more important than
> run time because I am just using APIs that are already optimized"
> HPC-ish stuff is now happening in Python with C/C++/Fortran libraries,
> cf. NumPy, SciPy.

True but somewhat irrelevant.  The problem with this is that you're 
still writing the critical bits in C/C++, and furthermore a dialect of 
C/C++ that requires a well-defined ABI.  In my experience, when mixing 
languages there's always friction along the borders.  Furthermore, when 
you do something like this you have to specify types explicitly.  D and 
C++ are the only languages I'm aware of that let you write efficient 
generic code.  After using D, C++ seems half-assed in this area.  D is 
the only language I'm aware of that lets you do it **well**.


More information about the Digitalmars-d mailing list