Meyer, OO and concurrency

Ulf Wiger ulf@REDACTED
Wed Jul 13 17:42:12 CEST 2005


Den 2005-07-13 16:31:55 skrev todd <todd@REDACTED>:

> Joe Armstrong (AL/EAB) wrote:
>> Now replace K by {Java, C++, C#, ...} and the word "object" by  
>> "process" :-)
>>
> I won't argue that "good" native support is not better, butthe analogy  
> doesn't apply. How many threads do I really need?

I think the analogy applies.
BTW, the answer to that question doesn't start to dawn on people
until they've spent a sufficiently long time with a language
that lifts the arbitrary restrictions. Being used to languages
with crappy concurrency support and UNIX-style heavyweight
processes, it's too difficult to make the mental shift required
to answer that question.

I know lots of people with over 5 years of experience
programming Erlang, who still can have difficulties
breaking out of the sequential programming mindset.


> I need as many as I have actual concurrent activities.

Oh, but can you see which ones they are?
It's about as difficult as doing object modeling, you
need to get into the mode of thinking before you realise
what is a good candidate for a process.


> Even then it's OK for activities to block. So I don't need
> thousands of threads for good effect. I can activate passivate
> objects or I can have enough RAM.

This is of course easier to do in Erlang than in most other
languages, but erlang programmers seldom do it -- why?
Because in more cases than not, you end up with messy,
unintuitive code with weird bugs lurking around every corner.

BTW, if Erlang processes were another order of magnitude
or two lighter, we could start using processes in ways
that we don't care to consider today. Doing an OO framework
on top of Erlang would be a breeze. Neural net programming
might be a real possibility. The limitations of our
programming languages colour our thinking tremendously.


> I'd also point out that ericsson doesn't program their
> entire telecom devices in erlang. That shows there is
> a weakness and it turns people off.

And since you are still not convinced, that also shows that
there is a weakness.  ;-)

Only a few days ago, I listened to a complaint about someone
who still maintains that faxes are superior to computers and
email. That says fairly little about email, but much more
about the person in question.

/Uffe




More information about the erlang-questions mailing list