Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!decvax!cca!ima!inmet!bhyde From: bhyde@inmet.UUCP Newsgroups: net.lang Subject: Re: Re: Anti-CLU... Anti-Strong-Typing.. - (nf) Message-ID: <589@inmet.UUCP> Date: Fri, 9-Dec-83 22:42:23 EST Article-I.D.: inmet.589 Posted: Fri Dec 9 22:42:23 1983 Date-Received: Sun, 11-Dec-83 01:14:20 EST Lines: 29 #R:vax2:-81700:inmet:4700013:000:1268 inmet!bhyde Dec 3 22:30:00 1983 It seems very reasonable that the compiler should be able to sweep over the input a couple times. Ada is full of stuff to avoid this, the form of an object must be bound in the same compilation unit as its first use. On this topic; Ada's elaboration before use rules are particularly interesting. The problem with not doing this is that at worst the entire program must be available to the compiler. Programs are big, and the data structures that compilers build to describe them are much bigger. Another problem is that the compiler then has to check for cyclic dependencies; records including instances themselves, generics including instances of themselves. The range of such a check can be very large, again the compiler may have to cover quite a scope to ckeck for them. Ada includes a few such checks, to make the check tractable the closure computation must be done incrementally as each compilation unit arrives and the program library is decorated with the partially completed computation. Quiz, is the rule that generics maynot contain instances of themselves required in any languages? It would be fun to attempt to design a production, modular (i.e. spec's and bodies seperated), strong typed language with out these kind of rules. ben hyde