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=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,38fc011071df5a27 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-06-16 12:11:06 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fu-berlin.de!uni-berlin.de!213.200.246.247!not-for-mail From: Vinzent Hoefler Newsgroups: comp.lang.ada Subject: Re: Ideas for Ada 200X Date: Mon, 16 Jun 2003 21:09:34 +0200 Organization: JeLlyFish software Message-ID: References: <3EE7CC70.E1FD3A67@adaworks.com> <3EECA772.4B662024@adaworks.com> NNTP-Posting-Host: 213.200.246.247 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: fu-berlin.de 1055790664 21646536 213.200.246.247 (16 [175126]) X-Newsreader: Forte Agent 1.8/32.548 Xref: archiver1.google.com comp.lang.ada:39268 Date: 2003-06-16T21:09:34+02:00 List-Id: Bill Findlay wrote: >On 16/6/03 19:19, in article bcl1pu$jscm4$1@ID-175126.news.dfncis.de, >"Vinzent Hoefler" wrote: > >>>> How would you think about >>>> i :=3D () +1; >>>=20 >>> I would think: this looks very error-prone. >>> I think any syntax for an "idem" feature should not easily result = from a >>> simple typographical error in writing a correct expression. >>=20 >> I'd say something similar to the the already proposed (or at least >> mentioned) "<>" would be good enough for me. >>=20 >> Or perhaps we should think about a longer one to discourage people to >> use it everywhere in their code. ;) > >All the proposals so far have their problems: > > idem (or any new reserved word) but: a new reserved word > all but: could be a typo for "p.all" > <> but: consider "<> < <>+1" Mmh. Well, this sure looks ugly, but its actual use isn't so obvious to me. I mean, we are talking about some kind of assignment here, aren't we? So how would come someone up with something like this: |x :=3D <> < <> + 1; On the first glance I can't find any idea where this makes sense. The result type should fit (so it should be boolean, I'd say) unless someone has made use of a quite strange overloading of the "<"-Operator... What am I missing here? > & but: consider "& & &" > @ (or # or ? or $ or %) but: wrong associations? > >Despite the possibility of suggesting wrong associations, I'm tending to= one >of the latter notations (this is about brevity after all), or perhaps = "all". So simply let's combine these. :-) I'd say "" or "" looks reasonable good, is long enough to not encourage the programmer to overuse it and also should avoid most if not all of the problems mentioned (it even doesn't have to be a reserved word then). Unless, someone comes up with |Idem :=3D < ... or |<> | ... or so... ;) A clear and distinct would be cool. I'd like that. Looks more Ada'ish. And nobody would be crazy enough to name a variable Left_Hand_Side, so we even could forget about the reserved word issue completely. >If " were not a string quote, it would be good, being used already as an >abbreviation for 'ditto'. 8-) Nice idea, and ... well, % is already a string quote, too, IIRC. :-) Vinzent. --=20 Parents strongly cautioned -- this posting is intended for mature audiences over 18. It may contain some material that many parents would not find suitable for children and may include intense violence, sexual situations, coarse language and suggestive dialogue.