New slides about Go

type erasure
Tue Oct 19 16:25:39 PDT 2010


retard Wrote:

> Tue, 19 Oct 2010 21:30:44 +0100, div0 wrote:
> 
> > On 19/10/2010 21:24, Paulo Pinto wrote:
> >> Am 18.10.2010 22:49, schrieb bearophile:
> >>> Nick Sabalausky:
> >>>
> >>>> It's amazing how many software houses/departments don't do that. But
> >>>> of course, if they don't it's their own damn problem.
> >>>
> >>> They want low-salary programmers, so they will avoid languages that
> >>> may lead to higher salaries. This means uncommon languages (where
> >>> programmers are more rare) or languages that may need the ability to
> >>> read (or even write) "harder code" (like inline assembly).
> >>>
> >>> Bye,
> >>> bearophile
> >>
> >> This is one of the reasons why Java has become such a huge language in
> >> the IT world.
> > 
> > yeah but to be fair, I work in a fully C++ shop and only 3 (maybe 4) of
> > us out of 18 will *ever* write template code.
> > 
> > even for really trival stuff.
> > 
> > In my xp, most c++ programmers just don't/can't get templates and I very
> > much doubt that awkward syntax is the root cause.
> > 
> > if you are one of those people why whould you chose a language with
> > templates? they are off no dam use to you.
> 
> Templates are used for at least two different purposes - to provide 1) 
> (generic) parametric polymorphism and 2) (generative) metaprogramming 
> code. Often the parametric version is enough (e.g. simple uses of 
> collections).

Complex C++/D collections are no simple generics. They have custom allocators and so forth. Study your home work, kid.

> 
> The first case is "optimized" in many modern language. For instance in 
> Scala polymorphic collections are rather simple to use:

Ha, you don't know anything of Java VM now do you? Type erasure removes all efficiency and makes your stupid code run at least twice slower than real generics. On top of that comes VM start up time and other garbage collection costs. Your solution is screwed when put against real native C++/D meta programming.

[snip ugly Scala & C++]

> Typical use cases don't require type annotations anywhere. The only 
> problem with high level languages is that they may in some cases put more 
> pressure to the optimizations in the compiler.

We want overly complex compilers with 10+ seconds run time? Hell no.

> What's funny is that the Scala developer here "implicitly" used terribly 
> complex templates behind the scenes. And it's as simple as writing in 
> some toy language.

Scala is just academic toy.

> Overall, even the novice developers are so expensive that you can often 
> replace the lost effiency with bigger hardware, which is cheaper than the 
> extra development time would have been. This is many times the situation 
> *now*, it might change when the large cloud servers run out of resources.

Slow code costs more in cloud services even today. You want cheap ? You write in native code.


More information about the Digitalmars-d mailing list