Re: Language design question

Tom Payne <thp@roam-thp2.cs.ucr.edu>
19 Feb 2000 00:30:55 -0500

          From comp.compilers

Related articles
[2 earlier articles]
Re: Language design question jejones@microware.com (James Jones) (2000-02-15)
Re: Language design question flisakow@ricotta.cs.wisc.edu (2000-02-15)
Re: Language design question mkg@lanl.gov (2000-02-16)
Re: Language design question joachim.durchholz@halstenbach.com.or.de (Joachim Durchholz) (2000-02-16)
Re: Language design question joachim.durchholz@halstenbach.com.or.de (Joachim Durchholz) (2000-02-17)
Re: Language design question kst@cts.com (Keith Thompson) (2000-02-19)
Re: Language design question thp@roam-thp2.cs.ucr.edu (Tom Payne) (2000-02-19)
Re: Language design question Andrew.Walker@nottingham.ac.uk (Dr A. N. Walker) (2000-02-27)
Re: Language design question hannah@mamba.pond.sub.org (2000-03-21)
Re: Language design question frederic_guerin@yahoo.com (Frederic) (2000-03-25)
Re: Language design question world!bobduff@uunet.uu.net (Robert A Duff) (2000-03-25)
| List of all articles for this month |
From: Tom Payne <thp@roam-thp2.cs.ucr.edu>
Newsgroups: comp.compilers
Date: 19 Feb 2000 00:30:55 -0500
Organization: University of California, Riverside
References: 00-02-065 00-02-077
Keywords: design

Shaun Flisakowski <flisakow@ricotta.cs.wisc.edu> wrote:
> Shaun Flisakowski <flisakow@ricotta.cs.wisc.edu> wrote:
>>It seems that with strong typing, there is no need for a dereferencing
>>operator, as the compiler could add these automatically. (I'd still
>>have an address-of operator)


> Thanks to everyone who replied. I've been (mostly) talked out
> of it, and will require a dereferencing operator for all calls
> except member selection, in which case the '.' will automatically
> add the derefences.


I'm coming into this thread very very late, but FWIW Stroustrup has
some interesting things to say about references (roughly,
automatically dereferenced pointers) in Design and Evolution of C++.
Specifically, he said that he had been bitten by Algol68 reseatable
references and would not allow such a facility in C++ -- once a
reference is initialized to a particular referent, it is not allowed
to change. (A loop-local reference can, however, refer to a different
referent on each iteration, since it is reborn and reinitialized on
each iteration.)


This prohibition on reseating is (almost) an automatic by-product of
the semantics of references; any attempt to modify the reference gets
referred to the referent, which then gets modified (if possible). I
say "almost," because real prohibition requires that there be no
aliases for the reference itself, by which one might reseat the
reference.


Tom Payne


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.