From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8f8cea8602e61aba X-Google-Attributes: gid103376,public From: Brian Rogoff Subject: Re: The Red Language Date: 1997/09/19 Message-ID: #1/1 X-Deja-AN: 273988109 References: <340E2DC5.25D7@worldnet.att.net> X-Trace: 874724406 6586 (none) 206.86.0.12 Newsgroups: comp.lang.ada Date: 1997-09-19T00:00:00+00:00 List-Id: On 19 Sep 1997, Robert Dewar wrote: > <... on one-pass vs two passes for overload resolution in Ada ...> > > Whether you call things one pass or two pass is to some extent just an > excercise in semantics. But when I say that two passes is fundamental, > what I mean is that before assigning the proper type to a given node, > it is necessary to visit nodes both above you and below you in the tree. > That means there is no canonical traversal scheme which allows you to > visit nodes just once. > > OK, of course you can visit nodes just once and then build a list of > results which are accessed separately, but by one pass scheme I would > mean a scheme that operates as follows. > > There is a canonical traversal of the operator tree which visits nodes > one by one and assigns types to each node at the time they are visited. > > Any other definition of one pass is unuseful. For example, the more flexible > definition would lead one to consider all compilers one pass because they > only look at the source once, and from then on they are dealing with > auxiliary data structures -- not a useful definition. I read that last paragraph and thought "Duhhh. He's right!". I sit corrected. Of course I can blame the Dragon book for the memory, but I should have thought this definition of "one pass" suspect. -- Brian