home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / modula2 / 1439 < prev    next >
Encoding:
Text File  |  1992-11-23  |  1.5 KB  |  34 lines

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