Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site pur-ee.UUCP Path: utzoo!linus!decvax!harpo!floyd!clyde!ihnp4!inuxc!pur-ee!iuvax!cjl From: cjl@iuvax.UUCP Newsgroups: net.lang Subject: Re: Anti-CLU... Anti-Strong-Typing... - (nf) Message-ID: <1201@pur-ee.UUCP> Date: Sat, 3-Dec-83 18:26:01 EST Article-I.D.: pur-ee.1201 Posted: Sat Dec 3 18:26:01 1983 Date-Received: Sun, 4-Dec-83 09:28:17 EST Sender: notes@pur-ee.UUCP Organization: Electrical Engineering Department , Purdue University Lines: 71 #R:dartvax:-41100:iuvax:11800004:000:3133 iuvax!cjl Dec 3 17:20:00 1983 From Abstract data type point of view, the data having the same structure don't have to have the same type names. That sounds quite reasonable. But from software engineering point of view, we cannot ignore efficient implementation. In Modula-2, Wirth offers a good solution. The language itself allows non-strong-type programming (called low level programming) with strong warning to the user by enforcing them to be imported from MODULE SYSTEM. While Pascal may appear too restrictive and C irresponsible, Modula-2 do resolve these conflicts quite beautifully. The low level features in Modula-2 include : (1) a low level type WORD and a complete set of type transfer func- tions whenever the operands have the same storage. (2) a low level type ADDRESS as the first class citizen with refer- ence function ADR and dereference function ^ and all operations derived from the CARDINAL type. (3) a typeless dynamic storage allocation procedure ALLOCATE and storage size functions SIZE(var) and TSIZE(type). (4) a Sequence type called "open array" which follows the rule of structure compatibility. As a low level feature, the open array is more consistent then Ada's unconstraint arrays. Remember even we have the same "sequence" structure, we may still want to give them different type names ! Again these are low level features which should be used with extreme care. So I think Modula-2 has resolved the problem now and we can put C and Bliss to rest now. From Chingmin Jim Lo Dept. of Computer and Information Science Indiana University-Purdue university at Indianapolis CSNET : cjl@Indiana@Rand-relay From Abstract data type point of view, the data having the same structure don't have to have the same type name. That sounds quite reasonable. But from software engineering point of view, we cannot ignore efficient implementation. In Modula-2, Wirth offers a good solution. The language itself allows non-strong-type programming (called low level programming) with strong warning to the user by enforcing them to be imported from MODULE SYSTEM. .pp While Pascal may appear too restrictive and C irresponsible, Modula-2 DO resolves these conflicts in a quite beautiful way. The low level features include : .np a low level type WORD and a complete set of type transfer functions whenever the operands have the same storage. .np a low level type ADDRESS as the first class citizen with reference function ADR and dereference function ^ and all operation of the CARDINAL type. .np a typeless dynamic storage allocation procedure ALLOCATE and storage size functions SIZE(var) and TSIZE(type). .np a Sequence type called "ARRAY OF type" which follows the rule of struture compatibility. As a low level feature, the open array is more consistent then Ada's unconstraint arrays. Remember even we have the same structure "sequence", we may want to give them different type names ! .pp Again these are low level features which should be used with extreme care. So why do we need C except for UNIX ?