Why Erlang is the best concurrent language available

Garrett G. Hodgson <>
Fri Jan 24 14:37:03 CET 2003


> James Hague wrote:
> > Oh, I didn't mean to imply that you said to write dumb code--
> > my apologies for that--but I think the typical reaction to
> > what you consider "beautiful" code, at least from many
> > programmers, is that it's horribly inefficient.  If you really
> > stop and think about what's going on in some Erlang programs,
> > like "I build up this list backward, then I reverse it at the
> > end, creating an entirely new copy of the list," then it
> > *sounds* pretty appalling.
> 
> Well, it is appalling. Knowing that recursion "winds up"
> before it "winds down", why do it twice when once will
> suffice? (Hey, I'm a poet but didn't know it!) :-)
> 
> > But that reaction is out of context.
> 
> Really? Try adding some costs, ie money, to the operation.
> To most businesses, profitability is the driving context.

to most businesses, cost of cpu cycles is way cheaper than cost of
development and maintenance.  profitability involves time to market,
life cycle costs, etc.  hardware gets cheaper every day.  people don't.

> > When your frame of reference involves hundreds of millions or
> > billions of cycles per second, with multiple machine
> > instructions executing per cycle, well, that's the stuff of
> > fairy tales. It's all so meaningless.  I say to go ahead and
> > make use of all that nonsense to make things wonderful and
> > understandable, not an intangible savings of thousands of
> > cycles here and there.
> > 
> > :)
> 
> If an operation can be made more efficient, the result of
> which is an increase in turnover without an increase in
> costs,

yes.  "without an increase in costs" is the problem, though.
the world is full of buggy systems prematurely optimized and
difficult to maintain.

-- 
Garry Hodgson                   Let my inspiration flow
Senior Hacker                      in token rhyme suggesting rhythm
Software Innovation Services    that will not forsake me
AT&T Labs                          'til my tale is told and done.
              





More information about the erlang-questions mailing list