Messaging vs. subroutines

Joachim Durchholz joachim.durchholz at munich.netsurf.de
Fri May 21 20:14:41 UTC 1999


"Michael S. Klein" wrote:
> 
> > > I would argue that the fundamental point of Smalltalk is that all
> > > of computing can be boiled down to entities passing bits of
> > > information to each other.
> >
> > So do subroutines. Or any other information-passing mechanism. By
> > the above definition, *everything* is a message send.
> 
> Subroutines have no identifiable entities that exchange information.

They have. A subroutine invocation is such an entity. Consider recursive
calls.

> Lets not degenerate into the old Turing-equivalency points,
> clearly everybody in this thread understands this, after all,
> its really all just electrons whizzing about.

Right. However, I think that saying "computing boils down to entities
passing information" is similar to the Turing equivalence thing. I hope
I have made my point a bit clearer.

Gosh, I'm enjoying this. I've had more new insights forming inside my
head in this discussion than otherwise in the past year. I'm having
trouble giving each new insight a proper wording on the first attempt; I
apologize for any misunderstandings that this causes. I can just hope
that I'm providing a sharpening stone for your ideas, so you can find
the best argument easier when the next dummy comes along.
:)

> What are the properties of subprogram invocations that are relavent?
> Where are the computational models similar, and where are they
> different? It's pretty clear that subroutines, methods, and macros are
> *all* examples of subprograms that "exchange" information.
> 
> Of course, if you want to just ramble away, here's a pointless
> question:
> 
>         Which rings truer:
>                 Messages are just subroutines.
>                         or
>                 Methods are just subroutines.
> ?

Not pointless. The analogy pairs methods with subroutines and messages
with subroutine signatures (I *know* the subroutine things aren't the
same as their Smalltalk counterparts, even if there's a fairly large
overlap).

> Normally, I wouldn't even enter this thread, but I'm on a job
> where the only programmers are using BASIC.  Don't tell me
> that a message send is just GOSUB.  Blarch!

Urk. Don't name such ugly things. Pleeease...

Regards,
Joachim
-- 
Please don't send unsolicited ads.





More information about the Squeak-dev mailing list