Popular conceit about learning programming languages

Pascal Costanza costanza at web.de
Mon Nov 25 04:21:14 EST 2002


Donn Cave wrote:
> Quoth Pascal Costanza <costanza at web.de>:

> | Message passing means that there are several entities that communicate 
> | by sending messages between them. The main points are that these 
> | entities are autonomous and that there is no central "main" program that 
> | controls the behavior of these entitities.
> 
> But that's somewhat circular.  Message passing means that there are
> entities that pass messages, eh?  But what would a message be, precisely?
> What are the semantics of passing, for the sender and the recipient?
> How is it different from calling a subroutine?  Is multi-threaded
> execution necessary for this model?  If there is no main program,
> where does the program begin?  Can Python programs be written this
> way, and if so how would you tell the difference?

The power of mental models is that they are not precise. Furthermore, I 
wasn't attempting to give a complete description - I mean, there are 
whole books you can read on this topic. ;)

> |> It can be much harder to get something done in pure FP, at least
> |> that's true for me.  Now, this is obviously because I ``think in
> |> Python'', or rather I think in procedural terms, and someone who
> |> ``thinks in Haskell'' will have less trouble.
> |
> | I have my doubts. When a Haskell program doesn't behave as expected you 
> | have to know what goes on behind the scenes - you have to know which 
> | expressions get evaluated at what stage, in which order statements are 
> | executed, and so on, in order to understand the program's behavior. 
> | However, languages like Haskell deliberately try to hide these things. 
> 
> Yes, that's an extra thing in Haskell - compared not only to Python,
> but also to ML and other functional languages.  So we aren't really
> talking about imperative vs. declarative here, though I admit it was
> my idea to hold up Haskell as a particularly good example.

You're right. The operational model of CAML is simpler than that of 
Haskell. And it wasn't my intention to dismiss Haskell, I think it's an 
important language and worthwhile to learn.


Pascal

-- 
Pascal Costanza               University of Bonn
mailto:costanza at web.de        Institute of Computer Science III
http://www.pascalcostanza.de  Römerstr. 164, D-53117 Bonn (Germany)




More information about the Python-list mailing list