<br><br><div class="gmail_quote">On Thu, Dec 1, 2011 at 3:26 AM, Russel Winder <span dir="ltr"><<a href="mailto:russel@russel.org.uk">russel@russel.org.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
On Wed, 2011-11-30 at 23:08 -0800, Walter Bright wrote:<br>
[...]<br>
<div class="im">> When you can implement a competitive malloc() using Java, I'll believe it has<br>
> reached parity. There's a reason why the JVM is itself implemented in C, not<br>
> Java. D's runtime is implemented in D.<br>
<br>
</div>This is like trying to compare apples and dog excrement.  Clearly malloc<br>
will always be written in C.<br>
<br>
I think this thread has shown that D folk need to accept that Java is a<br>
critical platform out there and will be for many years to come.<br>
Languages such as Groovy, JRuby and Closure -- the jury is still out on<br>
Scala, and the Jury cannot yet even compare Ceylon and Kotlin -- have<br>
evolved the milieu to be a active and efficacious one.  The point is<br>
that the JVM arena, the CLR arena and the native arena are three<br>
separate ones these days, with little or no crossover.<br></blockquote><div><br>Java is a joke.  Get over it.  Java is a toy language and the only reason people and companies have taken it seriously is because so many kids have have decided (brainwashed) to play with it.  With enough marketing and propaganda you can make people believe whatever you want them to believe.  Java is also the "blue collar" programming languages, which means corporations get to exploit people all around the world in order to make even more profits.<br>
<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
D's fight is with C, C++, Go, not with Java.  D needs to make inroads<br>
into areas currently dominated by C and C++ and those being swept up in<br>
the tide of Go.<br>
<br>
If D is to be anything other than a interesting blip in the history of<br>
programming languages it needs to gain traction from more than just the<br>
core aficionados.<br>
<br>
So which area can D compete well in, who are the people and<br>
organizations who can show that D is better than C, C++, D, and Go in<br>
these areas.  Why are they not out there doing guerilla marketing of D?<br>
<div class="im"><br>
> Most Java benchmarks I've seen that showed Java being competitive were written<br>
> in Java (or at least Java style) and then ported to other languages. The reason<br>
> is because if you want to convert C, C++, or D code to Java, you have to<br>
> re-engineer it.<br>
<br>
</div>So people doing the benchmarks you have seen are substandard and don't<br>
realize you are supposed to write the best idiomatic version of the<br>
algorithm in each of the languages under test.  This is not a stick to<br>
beat Java with.<br>
<div class="im"><br></div></blockquote><div><br>So far I have competed in the ACM ICPC regional programming contests twice.  I've met many students there and I've had many teammates, most if not all of them Java programmers.  Besides me (I've never actually done any Java), I don't know any other C++ programmer in there.  I have seen countless problems solved in Java and C++, with Java always being 10-20 times slower: same problem, same algorithms and/or data structures.  Whenever I find an article that talks about Java being faster than C++, I know it's BS.  You can find fair comparisons at <a href="http://www.spoj.pl/">http://www.spoj.pl/</a><br>
<br>Java is also very sluggish.  I don't exactly know why, but I'm sure it has something to do with JVM and/or GC.  Just look at Android and compare it to iPhone to see what I mean.  Apps running on the PC written in Java are also sluggish: Things like Eclipse and Open Office come to mind.<br>
<br>Java is a joke.  It's a faith-based ideology.  Get over it.<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">

> The reason escape analysis is used in the JVM is because the Java bytecode is<br>
> severely limited in what it can express. So, a language bytecode generator has<br>
> to bash its semantics somehow into that tiny vocabulary, and then the JVM has to<br>
> "reverse engineer" the intent back out of it. The effort poured into the JVM is<br>
> to recognize higher level Java constructs, not higher level Scala constructs,<br>
> hence the poor results from Scala mentioned in the article.<br>
<br>
</div>Fortran compiler writers have been doing this sort of thing very<br>
successfully for years:  1960s Fortran 4 serial code gets converted into<br>
parallel code by clever inferences and "reverse engineering.<br>
<br>
It has always amazed me that owners of these old Fortran codes think it<br>
is more important to expend resources on clever compiler trickery that<br>
just to rewrite the codes in a modern language, like Fortran 2009.<br>
<br>
Of course rewriting would give an opportunity to change language.  I bet<br>
they would go to C++ not D.  Though staying with Fortran 2009 may be<br>
even better.<br>
<br>
So the real question here is to get some benchmarks together to show<br>
that D outshines C, C++ and Fortran 2009 -- with of course the<br>
benchmarks being written properly in idiomatic language for each<br>
language not, as you noted earlier, transliterations from one language<br>
to all the others.<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
--<br>
Russel.<br>
=============================================================================<br>
Dr Russel Winder      t: <a href="tel:%2B44%2020%207585%202200" value="+442075852200">+44 20 7585 2200</a>   voip: <a href="mailto:sip%3Arussel.winder@ekiga.net">sip:russel.winder@ekiga.net</a><br>
41 Buckmaster Road    m: <a href="tel:%2B44%207770%20465%20077" value="+447770465077">+44 7770 465 077</a>   xmpp: <a href="mailto:russel@russel.org.uk">russel@russel.org.uk</a><br>
London SW11 1EN, UK   w: <a href="http://www.russel.org.uk" target="_blank">www.russel.org.uk</a>  skype: russel_winder<br>
</div></div></blockquote></div><br>