From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Path: eternal-september.org!reader02.eternal-september.org!gandalf.srv.welterde.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Ada syntax questions Date: Wed, 23 Dec 2020 22:06:03 -0600 Organization: JSA Research & Innovation Message-ID: References: <5fdbde31$0$6455$426a74cc@news.free.fr> <87r1nkb0lj.fsf@nosuchdomain.example.com> Injection-Date: Thu, 24 Dec 2020 04:06:04 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="1212"; mail-complaints-to="news@jacob-sparre.dk" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 Xref: reader02.eternal-september.org comp.lang.ada:60936 List-Id: "Dmitry A. Kazakov" wrote in message news:rrv0u2$102i$1@gioia.aioe.org... > On 2020-12-23 02:23, Randy Brukardt wrote: >> "Dmitry A. Kazakov" wrote in message >> news:rrs92d$1pfi$1@gioia.aioe.org... >> ... >>> But you cannot rid of X(...) syntax, where X is an object. >> >> That's a prefixed view, of course. No one would want to get rid of that. > > Hmm, where is the operation? A prefixed view is > > .(...) > > Indexing is > > (...) I neglected to mention that what Ada calls objects are also function calls in this proposed generalization. (Much like enumeration literals are in Ada.) So for static semantics (that is, compile-time), pretty much everything is a function call. This gets rid of the anomalies associated with constants (which don't overload and thus hide more than a parameterless function - which is otherwise the same thing); combined with variable-returning functions, everything is overloadable and treated the same in expressions. Almost no special cases (operators still require some special casing, but we can make them always visible which would eliminate more issues). Clearly a compiler for this language (which can't be Ada, unfortunately, way too incompatible) would special-case some kinds of built-in functions for things like objects and indexing. But that doesn't need to hair up the semantic model, just the implementations. ... >> Ada (and most other languages) are full of redundant stuff. Simpilfy the >> basics and then one has more room for interesting stuff (static analysis, >> parallel execution, etc.). > > Yes, but I would rather keep all this stuff in the language making it > overridable primitive operations. Yeah, you don't plan to formally describe nor implement this language, so you don't really care about how complex it gets. :-) Well, at least not until performance suffers. Ada is reaching the limit of what can be done without substantial incompatibility. If we're going to allow that, we need to start with a cleaner base, and part of that is getting rid of redundancies. Randy.