[erlang-questions] No, really, please stop misinterpreting what I wrote

Toby Thain toby@REDACTED
Sun Sep 20 23:11:23 CEST 2009


On 17-Sep-09, at 7:05 AM, Michael Turner wrote:

> ...
> In a paper I can't immediately identify right now, the authors  
> remarked
> that Erlang programmers often spend a fair amount of time trying to
> measure what's fast in Erlang, then writing stuff using what they
> discover is fast.  The authors were disturbed, saying that they'd
> prefer that Erlang programmers implement things so as to be *clear* in
> Erlang, so that maintainers of the Erlang interpreter and compiler  
> would
> know what to target for optimization.

This is true of any language, I think, and particularly true of  
declarative languages (I am thinking of SQL, for example).

>
> And now we have James Hague pointing out that an ambiguity (?) in  
> Erlang
> semantics means that he's now got a great optimization, but one that
> might go away if Erlang is allowed to optimize it out.  Well, C is
> really great for optimizing stuff, but I've had my "lightweight
> semantics" optimizations in that language optimized out by a  
> subsequent
> release of the compiler, and I deserved what I got.  One of C's
> co-designers contributed the now-famous saying: "Premature  
> optimization
> is the root of all evil in software."

To be pedantic, I think that was actually Professor Knuth*.

--T

> Probably because, with that
> language being what it is, he'd seen a lot more evil than most of us.
>
> It's hard habit to acquire (because optimization can be so much fun),
> but it's a good one: the habit of asking yourself, in contemplating an
> optimization, "Would this solve the real problem?  Or just compensate
> for it?" ...
>
> -michael turner
>

* http://shreevatsa.wordpress.com/2008/05/16/premature-optimization- 
is-the-root-of-all-evil/
+ http://www-cs-staff.stanford.edu/~uno/

>
>
>
> ________________________________________________________________
> erlang-questions mailing list. See http://www.erlang.org/faq.html
> erlang-questions (at) erlang.org
>



More information about the erlang-questions mailing list