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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no 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!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: a new language, designed for safety ! Date: Sun, 15 Jun 2014 14:25:21 +0200 Organization: cbb software GmbH Message-ID: <1dq4luqfsvaff.1gwqr3exbto0y$.dlg@40tude.net> References: <1402308235.2520.153.camel@pascal.home.net> <85ioo9yukk.fsf@stephe-leake.org> <9qednXOIGNDuLQXORVn_vwA@giganews.com> <1872904482424209024.314619laguest-archeia.com@nntp.aioe.org> <810507a4-427e-42bb-a468-e5939a4470db@googlegroups.com> <9qbfr6yf0gnb.182y1qs9eigz4$.dlg@40tude.net> <1lk5etrvv7sy2$.p7h015lw2pmn$.dlg@40tude.net> <539d6faa$0$6670$9b4e6d93@newsspool3.arcor-online.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: AuYlnUSfTZrfhAkRjyySpQ.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news.eternal-september.org comp.lang.ada:20317 Date: 2014-06-15T14:25:21+02:00 List-Id: On Sun, 15 Jun 2014 12:04:26 +0200, Georg Bauhaus wrote: > On 15/06/14 08:52, Dmitry A. Kazakov wrote: >>> >Oh, dynamic memory is the same in this aspect. Should it be in the >>> >language or in the library? >> In the library. Ada 95 introduced storage pools for exactly this purpose. > > But moving (backing) operators to (by) the library should not entail > abandoning special syntax, I would hope? Another language design principle reads: any operator shall be implementable by a user-defined subprogram. Operator is only syntax sugar. There is nothing wrong in having an unary prefix operator "new" along with "abs", "+", "-", except for reserving the keyword "new", of course. > Imagine a programmer wishing to express a typical pattern such as > > "Find A in B!" No problem: find - prefix unary operation A - operand in - infix operation B - operand ! - postfix unary operation If you are ready to make "find" reserved and allow "!" there would be no syntax problem. "in" is already an infix operation in Ada. > Operators in (syntactical) context will add readability because > the pattern is clear, not because one knows some names. No, they are ambiguous if not reserved keywords *and* if association priorities are unset. You need to reduce syntax into non-existence, like Forth does, in order to have that. And nobody sane would claim Forth readable. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de