home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / lang / modula2 / 980 < prev    next >
Encoding:
Internet Message Format  |  1992-07-30  |  1.4 KB

  1. Path: sparky!uunet!cs.utexas.edu!sun-barr!ames!agate!apple!mumbo.apple.com!apple!apple!lins
  2. From: lins@Apple.COM (Cheryl Lins)
  3. Newsgroups: comp.lang.modula2
  4. Subject: Re: Oberon Question
  5. Summary: enums & space
  6. Message-ID: <70661@apple.Apple.COM>
  7. Date: 30 Jul 92 17:21:46 GMT
  8. References: <z#pml+=.thomp@netcom.com>
  9. Organization: Apple Computer Inc., Cupertino, CA
  10. Lines: 29
  11.  
  12. In article <z#pml+=.thomp@netcom.com> thomp@netcom.com (Thom Philabaum) writes:
  13. >Does Oberon support ennumerated types as in Pascal/Modula?
  14.  
  15. No. Enums as a special construct are history.
  16.  
  17. >If not, is there something that provides similar functionality?
  18.  
  19. There are several techniques.
  20. 1. Use constants and named types.
  21.     CONST red* = 0; green* = 1; blue* = 2;
  22.     TYPE Colors* = SHORTINT;
  23. 2. Use objects. A class to represent colors, and one instance
  24.    per color.
  25.  
  26. There are probably other ideas too. And i don't want to hear any whining
  27. about how you lose type-checking. With a minimum of care on the programmer's
  28. part, this is a non-issue. 
  29.  
  30. >One of the boasts about
  31. >Oberon is that is doesn't require oodles of memory/diskspace and yet you
  32. >can't run it on what would seem to be sufficiently powerful machines.
  33.  
  34. But Oberon does want lots of screen real estate. It seems they only envision
  35. Oberon as a desktop system. This is too bad, because I can easily imagine
  36. a PDA based on Oberon.
  37.  
  38. -- 
  39. Cheryl Lins, Apple Computer, Inc. Oberon-2 Paladin  lins@apple.com
  40. "Oppression breeds violence" - Front Line Assembly
  41.