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,e3c7ee8cd1d3f414 X-Google-Attributes: gid103376,public From: dewar@merv.cs.nyu.edu (Robert Dewar) Subject: Re: rep clause in generics Date: 1997/03/15 Message-ID: #1/1 X-Deja-AN: 225802174 References: <01bc3057$61a78db0$81946482@vkpc131> Organization: New York University Newsgroups: comp.lang.ada Date: 1997-03-15T00:00:00+00:00 List-Id: Robert Duff said <<(As a compiler writer, I find it annoying that 'Size is *ever* static -- it messes up one's compiler design. You'd like to say 'Size is a machine-dependent thing, and relegate it to the back end, or some such late, machine-dependent, phase. Unfortunately, its value is needed during overload resolution: e.g.,>> Interestingly, with GNAT, we have found that the rules about whether 'Size is static or not are essentially perfect from the point of view of the organization of tasks between our front and backend. The frontend has no trouble knowing what Integer'Size is, but it would be hard for it to know what Rec'Size was even for a record with a single integer field. If such sizes were static, we would need a completely different design which would entangle the front end and backend much more extensively. But having sizes of simple scalar stuff be known to the front end is no problem for us. (of course I can certainly see why it might cause toruble in some other design, but given that all you need is a relatively small table -- not a complex target dependent algorithm -- to know what the sizes are of primitive data, i don't see it as a problem.