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.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Oberon and Wirthian languages Date: Sun, 27 Apr 2014 11:38:59 +0100 Organization: A noiseless patient Spider Message-ID: References: <1ljwj8f.1wqbhvuabsdw1N%csampson@inetworld.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx05.eternal-september.org; posting-host="17b46ff0ef6492aedc2232708a5c5eff"; logging-data="9912"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18+GEa83Txbb0kxLOpNn5xLu6KtnPg1PzU=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (darwin) Cancel-Lock: sha1:0nwiq7Fzrg8mdVGRJpEGYSVicA8= sha1:OgpQzIY6IYS6cNMr3pOTmv+mC3s= Xref: news.eternal-september.org comp.lang.ada:19610 Date: 2014-04-27T11:38:59+01:00 List-Id: Simon Wright writes: > Niklas Holsti writes: > >> On 14-04-26 10:23 , Simon Wright wrote: >>> "Randy Brukardt" writes: >>> >>>> This is a case where the keyword will make all of the >>>> difference. If we were >>>> using a new keyword, perhaps something like: >>>> >>>> A := (A replacing C => D, E => F); >>>> >>>> would do the trick. >>> >>> I'd find >>> >>> A := (A with C => D, E => F); >>> >>> quite straightforward. >> >> Yes, but that looks exactly like an extension aggregate, where the >> ancestor object A is extended to a derived type with the new components >> C and E. Maybe the compiler would not be confused, but I would be. I >> think that an "updating" partial aggregate should be syntactically >> distinct from an extension aggregate. > > OK, point taken But Dirk Craenest says (out of band) > I haven't been able to follow the whole discussion in detail, but > what about: > > A := (A overriding C => D, E => F); > > It seems to have everything wished for: > - doesn't need a new keyword, > - is short, > - uses aggregate-like notation, > - "reads" reasonably well, i.e.: > use the value of A, but overriding component C with D, and E with F.