enumeration types in Oberon
Soren Renner — 2001-03-29 16:04:10
> Another option would be to introduce what in Pascal and in
> some other languages are enumeration types:
> TrafficLights = (red, green, yellow)
> which in most respects would be equivalent to something
> which in (current) Joy be
> red == 0; green == 1; yellow == 3;
> and similarly in old K&R C. I seem to remember that the
> enumeration type was not included in Oberon (am I right,
> Soren?), for some reason to do with type extensions or
> something. Anyhow, enumeration types like "TrafficLights"
Oberon does not have enumeration types. I don't know if the reason had anything to do with type extensions. The first Oberon did't even have a FOR construct, although later versions did. The Oberon spirit dictates the omission of features whenever possible.
sr