home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.modula2
- Path: sparky!uunet!news.univie.ac.at!chx400!bernina!neptune!templ
- From: templ@inf.ethz.ch (Josef Templ)
- Subject: Re: Oberon vs Modula-2
- Message-ID: <1992Nov23.124207.9204@neptune.inf.ethz.ch>
- Sender: templ@inf.ethz.ch
- Nntp-Posting-Host: lillian-gw
- Organization: Dept. Informatik, Swiss Federal Institute of Technology (ETH), Zurich, CH
- Date: Mon, 23 Nov 1992 12:42:07 GMT
- Lines: 22
-
- Andreas Borchert writes:
- > I don't see any interpretation which allows the declaration "b = POINTER TO c"
- > to be bound to the previously declared type "c". The amendments take
- > precedence over the statements before (that follows clear from the text)
- > and, consequently, I may declare the referenced type even if there
- > exist the same identifier in the outer scope.
-
- Intentionally, there is no difference in Oberon and Oberon-2 on this topic.
- The formulations, however, vary slightly.
- Taken literally, the Oberon-2 report is (IMHO) ambigous and the Oberon
- report may be more than ambigous (i.e. wrong).
- Considering the intention, both reports introduce a special rule for
- pointer forward declarations. This rule should only be applied
- if the pointer base type is not visible, i.e. if a forward reference
- is made. There is no forward reference if the base type is already
- declared. Consequently, the forward declaration rule cannot be applied.
-
- But, wouldn't it be nice to resolve these ambiguities by removing
- local types (and procedures and constants) from the language?
-
- - Josef Templ
- the usual disclaimer applies
-