Erik de Castro Lopo <mle+s...@mega-nerd.com> writes:
> André Pang wrote:
>> On Apr 23, 2009, at 7:01 PM, Erik de Castro Lopo wrote:
>> 
>> > My rules for scripting style tasks are something along the lines of:
>> >
>> >  - Less than 20 lines, bash is ok.
>> >  - Less than 100 lines, python, maybe.
>> >  - Otherwise Ocaml or Haskell.
>> 
>> - More than 1,000,000 lines, C++.
>
> Are you kidding?
>
> AFAIAC, C and C++ are for low level code or tasks which are highly
> performance critical.

Pshaw.  What crazy talk is this?  C and C++ are so lax in their design
that they offer relatively few optimization options to the compiler.

It also offers pretty much no run-time profiling information, due to the
design, so can't take advantage of trace optimization or any other
activity based compilation.

> Wherever that is not the case they are simply not worth the bother.

Generally speaking, a sane high level language that has a good optimizer
is going to be better.

OCaml is significantly faster, in general, because the design is much
tighter and so offers better static options.

Something running on a high end JVM implementation, or on something like
TraceMonkey, is going to take significantly better advantage of runtime
profiling to generate better code.

They also have the benefit of optimizing for the biggest cost in
software, programmer time.

Regards,
        Daniel
_______________________________________________
coders mailing list
coders@slug.org.au
http://lists.slug.org.au/listinfo/coders

Reply via email to