home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / lang / modula2 / 1367 < prev    next >
Encoding:
Internet Message Format  |  1992-11-09  |  4.0 KB

  1. Path: sparky!uunet!stanford.edu!agate!ucbvax!MAIL.CASI.NASA.GOV!thutt
  2. From: thutt@MAIL.CASI.NASA.GOV (thutt)
  3. Newsgroups: comp.lang.modula2
  4. Subject: mail delivery error
  5. Message-ID: <9211091022.A01745@MAIL.CASI.NASA.GOV>
  6. Date: 9 Nov 92 15:22:39 GMT
  7. Sender: usenet@ucbvax.BERKELEY.EDU
  8. Reply-To: Modula2 List <INFO-M2%UCF1VM.BITNET@cmsa.Berkeley.EDU>
  9. Organization: The Internet
  10. Lines: 74
  11.  
  12. ---------------------------- Forwarded with Changes ---------------------------
  13. From: MAILER%INDYCMS.IUPUI.EDU@UICVM.UIC.EDU at SMTPLINK-CASI
  14. Date: 11/9/92 9:54AM
  15. To: thutt at casi
  16. Subject: mail delivery error
  17. -------------------------------------------------------------------------------
  18. -=> (again) Quoting Roland Frederic to All <=-
  19.  
  20. RF> Hi! I'm new here and I recently read a text file about Modula-2 and
  21. RF> Oberon. For now I program in Turbo Pascal and since I eard that all
  22. RF> these languages came from Niclaus (sic, it is actually Niklaus) Wirth
  23. RF> I wish to have a few enlightment about difference between these languages.
  24.  
  25.    Since someone has already answered the Modula-2 side of the question, I will
  26.    answer the Oberon side.
  27.  
  28.    Oberon (named for the moon of Uranus) was developed by N. Wirth and J.
  29.    Gutknecth of ETH.  The design goal was one of simplicty, and that is
  30.    reflected in the language and the operating system.
  31.  
  32.    Oberon removes all of the extraneous features of Modula-2, cleans up the
  33.    language, and adds a few new features to allow for more type checked variant
  34.    records (and object oriented programming style).
  35.  
  36.    Each of these things will be tackled briefly (after all, I have to earn a
  37.    living).
  38.  
  39.    1) Removal of superfluous items:
  40.       a) Enumerations:  They do not add enough expressiveness to a program
  41.       to warrant the added complexity in the compiler.  For the most part,
  42.       if you are using modules in a good fashion, you can use constants in
  43.       the place of enuerations.  The only drawback to this is that of
  44.       type-checking.
  45.       b) Nested modules:  Discovered to be hardly used, and thus removed c)
  46.       generic SET OF: Since there is no enumeration, what are you to make a
  47.       set from?  The SET type is now equivalent to the M-2 BITSET. It is of
  48.       an implementation dependant size (usually at least 32 bits). d) FOR
  49.       statement removed in Oberon.  It is reinstated in Oberon-2.
  50.       e) DEFINITION & IMPLEMENTATION merged.  Exported identifiers are
  51.       marked with a *.  Read-only exported variables are marked with a -.
  52.       Let us hope they make a read-only VAR parameter, which would be
  53.       useful for exported procedures that take a VAR parm for efficiency.
  54.       The programmer using the procedure would be guaranteed that the
  55.       parameter is not modified!
  56.  
  57.    Some other items have also been removed, but these are the biggies.
  58.  
  59.    2) Cleans up the language
  60.       a) concept of mathematical inclusion. SHORTINT (subset of) INTEGER
  61.       (subset of) LONGINT (subset of) REAL (subset of) LONGREAL.  Thus, you
  62.       can assign any smaller type to any larger type without an error.  The
  63.       SHORT and LONG procedures allow you to convert from a longer type to
  64.       a shorter type, and the ENTIER allows a real to integer conversion.
  65.       b) All language constructs still fully bracketed.  No dangling ELSE a
  66.       la Pascal.
  67.       c) If a statement does not match any item in a CASE or WITH, _and_ no
  68.       ELSE cluase is specified, the program will abort. (Not a language
  69.       clean up, but it is clearly specified)
  70.  
  71.    3) New items
  72.       a) Type extension, testing, guard
  73.       b) New form of WITH
  74.       c) FOR construct reintroduced
  75.       d) Type-bound procedures (Oberon-2) (also called methods or member
  76.       functions)
  77.  
  78. You can obtain an implementation of Oberon for the RS6000, SPARCstation,
  79. DEC3100, MacII or MSDOS (requires 386) from neptune.ethz.ch
  80. (129.132.101.33).  You can also get the Oberon documentation (langauge
  81. definition, et al) from this site.  Check out the subdirectory /Oberon
  82.  
  83.  
  84. Taylor Hutt (thutt@mail.casi.nasa.gov)
  85. Championing worldwide usage of Oberon-2!
  86.