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: bobduff@world.std.com (Robert A Duff) Subject: Re: The Red Language Date: 1997/09/14 Message-ID: #1/1 X-Deja-AN: 272452620 References: <340E2DC5.25D7@worldnet.att.net> Organization: The World Public Access UNIX, Brookline, MA Newsgroups: comp.lang.ada Date: 1997-09-14T00:00:00+00:00 List-Id: In article , Matthew Heaney wrote: >Funny you should mention that. Ada wisely creates an implicit block for >statement lists in if statement alternatives and case statement >alternatives, etc, but, interestingly, doesn't extend implicit block-ness >to objects declared there. I don't understand what you mean by "creates an implicit block". >>Weaker overload resolution rules (than Ada). Eg no top-down resolution, >>except in limited cases. Function result types not considered for >>resolution. > >I like the Ada choice. Me too. >...Why do so many language designers think less of >function return types? Perhaps because it's harder to implement. In C++, you can do overload resolution in a single bottom up pass. Start at the leaves of the expression, and propagate the type of each expression up. In Ada, you need to propagate *sets* of types (or sets of interpretations, or some such) up the tree, and then you have to do a second (top down) pass to propagate the information back to the leaves. >And another thing I want: real constructors. I'd like to be able to have >indefinate limited types, that can be initialized in the declarative >region: Why don't access discriminants do what you want? Just because there's no access constant? - Bob