[cap-talk] Algol-68 and ML terminology

David Hopwood david.nospam.hopwood at blueyonder.co.uk
Thu Jan 18 13:11:55 CST 2007


Mark S. Miller wrote:
> Jonathan S. Shapiro wrote:
> 
>>MarkM, Ping: does the use of the term "reference" in the page correspond
>>precisely to the use of this term in ML and/or Haskell? It would be very
>>nice if it did.
> 
> I thought I knew that the answer to this is "no",

It is "no". I think the confusion here comes from terminology vs semantics.

> but earlier
> 
> David Hopwood wrote:
>  >>> I don't find these other types of references confusing (perhaps because
>  >>> I have a programming language background, and the use of "reference"
>  >>> here exactly corresponds to the OO language usage).

Here I was talking about the use of the term "reference" in, e.g. Smalltalk
or Eiffel, but *not* in Algol68 or ML. The latter are not OO languages
(O'Caml aside).

> Charlie wrote:
>  >> I'm surprised by this, but I'll defer to the language folks. Are
>  >> there languages other than Algol68
> 
> David Hopwood wrote:
>  > Algol68 terminology uses the term "reference" to mean a cell, although
>  > Algol68's semantics an be considered as you describe above.
>  >
>  >> that use references to integers this way?
>  >
>  > Yes, plenty: Smalltalk, the ML family, all Lisps, E, Haskell, etc.

Here I was talking about semantics. ML-family languages do use references to
refer to integers and other primitive types, even though these languages don't
call them "references". (Variables can polymorphically be bound to a reference
to either a primitive or non-primitive value, for example.)

>  > Once you are used to such languages, you tend to view the semantics
>  > of all languages in a similar way, even if the mapping is sometimes a
>  > little forced.
> 
> David, your statements above regarding Algol68 and ML surprise me. I thought 
> in both, "reference" means what "Slot" means in E, "cell" in Oz, or "location" 
> in the Scheme semantics -- a means for enabling mutability.

Isn't that what I said? :

  "Algol68 terminology uses the term "reference" to mean a cell, although
   Algol68's semantics an be considered as you describe above."

I find it better to avoid using the Algol68/ML terminology and use the
term "cell" for a mutable location.

> The first footnote in my thesis states:
> 
> # Those familiar with ML or Algol68 may find our use of the term "reference"
> # confusing. By "reference" we mean "object reference" or "protected pointer,"
> # i.e., the arrows that one draws when diagramming a data structure to show
> # which objects "point at" which other objects. Our "references" have nothing
> # to do with enabling mutability.
> 
> Am I confused about Algol-68 and ML?

No, I don't think so.

-- 
David Hopwood <david.nospam.hopwood at blueyonder.co.uk>



More information about the cap-talk mailing list