Xref: utzoo comp.lang.misc:1121 comp.lang.modula2:669 Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!pasteur!agate!ig!uwmcsd1!bbn!rochester!crowl From: crowl@cs.rochester.edu (Lawrence Crowl) Newsgroups: comp.lang.misc,comp.lang.modula2 Subject: Re: From Modula to Oberon Message-ID: <7321@sol.ARPA> Date: 2 Mar 88 21:57:12 GMT References: <7161@sol.ARPA> <2787@enea.se> Reply-To: crowl@cs.rochester.edu (Lawrence Crowl) Organization: U of Rochester, CS Dept, Rochester, NY Lines: 25 Keywords: Enumerations, subranges, arrays, FOR, Eiffel In article <2787@enea.se> sommar@enea.UUCP(Erland Sommarskog) writes: >The extended type facility is a nice feature, but principally it's just >another way of expressing prefix classes, well-known from Simula. A somewhat >different approach is Ada's generic packages with private-type parameters. Ada's generic packages may introduce a new procedure to handle each parameter type. Oberon's extended types guarantee that exactly one procedure is needed. Ada's generic packages allow only one type to be in the corresponding structure (e.g. queue), while Oberon's extended types allow many different types to be in the queue. Ada's generic packages allow putting a type on a queue to be done simply as an afterthought, but using Oberon's extended types requires the more effort to put a type on a queue as an afterthought. >The idea of having all arrays starting on index zero is really to put the >burden on the programmer. ... And his argument about saving execution time >for index computation is truely naive. The result will just be references >like: "String(char_no + 1)", just making the code more verbose and complex >for no use. One compiler technique adjusts the "base" address portion of the index computation to account for non-zero lower element. This optimization becomes harder if non-zero basing is done in user code. -- Lawrence Crowl 716-275-9499 University of Rochester crowl@cs.rochester.edu Computer Science Department ...!{allegra,decvax,rutgers}!rochester!crowl Rochester, New York, 14627