Website message overhaul

Paulo Pinto pjmlp at progtools.org
Sun Nov 20 00:55:20 PST 2011


Am 19.11.2011 21:22, schrieb Nick Sabalausky:
>
> Well, the vast majority of the time I come across a slow, bloated app, it's
> from a VM or otherwise dymanic language. The vast majority of the time I
> come across a lean, zippy app, it's from something like C/C++/D/etc.
> Whatever the exact reasons, the former group of langauges tends to lean
> towards inefficient approaches, and the latter group tends to lean towards
> more efficient approaches. (I try to avoid calling the things like
> C#/Ruby/Java/etc high-level, since I consider D to be just as high-level, if
> not more - it's just that D is *also* more low-level, too)

Sure you are right, but that is because most developers nowadays don't 
learn properly how to code.

In my line of work, one of the reasons why we make static analysis tools
part of the build process is to force developers to code properly.

Sometimes I ask myself what some of our developers were doing at the 
university.


>
> Also, in my own personal experience coding, even just a quick-n-dirty
> approach in C, C++ or D tends to be *noticably* more efficient than putting
> forth the same amount of effort in something like C# or Java. With the
> VM-ish stuff, I've always found you need to put forth more effort to get
> comparable efficiency.

As for C,C++, D usually you get faster results quicker that's for sure, 
but you can also do that in other languages, specially if native code 
compilers are available to it. But you are right that some more effort 
might be required, depending on the algorithm in case.

Haskell is a good example. It can run as fast as C in most cases, but 
you need to aproach your problem with a completely different mindset.

>
> Interesting point. Although, it is a balancing act: From what I hear, JVM is
> considered to have a top-notch GC (no doubt due in part to it's lack of
> low-level ability), but I bet you'd be hard-pressed to get our
> reinterpret-cast-Foo example or codecs/filter/rasterizers/etc (assuming you
> actually wanted to ;)) to run as fast in Java as in D.
>

That is the reason I tend to favour polyglot programming. As a possible 
example, I would rather write the majority of the application in Java 
and leave the codec implemented in C, while calling it via JNI.

This is how we code most applications in my line of work.

Anyway, this was the reason I was against referrin to C# in the language 
slogan. If you start comparing against other languages, in the eyes of 
the receiver you already lost, most time.

Surely you need to compare, but that comes afterwards after the person
has got some interest to find more about the language.


More information about the Digitalmars-d mailing list