Template Metaprogramming Made Easy (Huh?)

language_fan foo at bar.com.invalid
Thu Sep 10 08:27:44 PDT 2009


Thu, 10 Sep 2009 06:05:59 -0400, Nick Sabalausky thusly wrote:

> "#ponce" <aliloko at gmail.com> wrote in message
> news:h8acpi$21u1$1 at digitalmars.com...
>>> At least the problem with many old-school developers is that even
>>> though a new language is 10x more readable, 100x more flexible, 1000x
>>> safer and 10000x faster to develop with, if it's 0.1% slower than C++,
>>> they have no reason to use it. Well, it shouldn't be a surprise given
>>> that JVM *is* a VM.
>>
>> So I'm a 22 yo oldschool developer.
>> One reason I hate VM language is not really about speed but that you
>> have few control on what the CPU do, and very few control over memory
>> and cache usage. Compound value types also are often lacking
>> (especially in Java).
>>
>> See python internal objects size :
>> http://www.codexon.com/posts/memory-size-of-python-objects Everything
>> takes 4x the memory it would take in D. Each field access seems to be a
>> lookup into a hashmap. This is plain ugly.
>>
>> Also, when some part of a program is slow in C / C++ / D, most of time
>> you have a way to speed it up. It may be painful but there is one.
>>
>>
> Yea, and another issue with VM-only languages is that you can't really
> use them for systems programming (ex, try using Java or Python to write
> firmware

For what's it worth, I have not seen any firmware projects that use D, 
either. Not that it's impossible, no one in the firmware industry just is 
not interested in D. When you have limited amount of memory resources, 
the bloaty executables that dmd generates (all firmware uses x86 opcodes, 
right), the typeinfos, and the garbage collector are a nuisance.

, or a commercially-competetive NDS game. And what language is a
> person going to use to implement that VM in? Another VMed langauge? That
> would be pointless). Now, for some people that's not an issue, because
> they may never venture outside of web development and maybe end-user
> desktop apps (Hell, most of the programmers I've met here in Cleveland
> would never be *capable* of going beyond such simple types of
> software...but that's a whole other set of discussions...).

I happen to know that for instance the code (written in e.g. Java) 
banking industry, online shops, and web search engines use, isn't quite 
the simplest type of software. You can ask amazon or google or the 
technical department of your favorite bank. They wouldn't use C++ or D in 
its current form for the majority of their tasks, it's just how it is.

The problem with many developers is that they refuse to understand the 
mathematics behind algorithms. Time complexity just happens to matter 
more when you have millions of clients etc. If Java is 50% slower, it 
doesn't matter when your algorithm is 4 orders of magnitude faster with 
10 million clients. Writing good algorithms is quite hard and error prone 
in low level languages and that's why bad algorithms are usually used 
even if they are known to perform weakly.



More information about the Digitalmars-d mailing list