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: Tue, 17 Jun 2014 11:13:43 +0200 Organization: cbb software GmbH Message-ID: <57qf222vyy01$.qjeaddzypcw2.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> <86ab6158-7273-4696-b4be-ceb950c7f218@googlegroups.com> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: QTaafVZuunHujkJPndFR7g.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:20392 Date: 2014-06-17T11:13:43+02:00 List-Id: On Tue, 17 Jun 2014 01:18:46 -0700 (PDT), Maciej Sobczak wrote: >>> What if we treat the standard library as part of the language? >> >> It would be self-contradictory. > > No. There are languages where even things like package importing, adding > fields to record types or even virtual dispatch are library-level > operations. They might or might not have a support at the level of what we > consider "syntax", but even there the border is blurred. It is never blurred, cannot be. It could be ill-defined, yes. But in a *well-defined* formal language each syntactic construct is either legal or not. A library is either composed out of legal constructs or not. In the former case it is not a part of the language. In the latter case it isn't either. >> A library is defined in the language terms, > > You are trying to give your own definitions as if they are universal > truth. http://en.wikipedia.org/wiki/Library_%28computing%29 Straight in the first sentence. > My definition is: language and its standard library are > indivisible. What now? Then it does not make sense to distinguish them. Thus there is no library at all. Not my invention either: http://en.wikipedia.org/wiki/Occam_razor > I agree that it is a cool ideal to have a language that allows you to > implement its own run-time or at least as much of it as possible. But I > don't accept it as an objective definition. Huh? The whole idea of programming is implementing own "run-time", isn't it? >>>> If Ada were a better language, array could be a >>>> library container. >> >>> Assembly language fits that ideal, right? >> >> No it does not. Assembly languages do not have containers. > > You have asked for a library. Definitely assembly languages can have > libraries with containers. Nope, it cannot. As I said earlier you can get an equivalent functionality (per Turing-completeness), but you could not organize it as a set of types with instances of. Assembly language does not support user-defined types. >> BTW, assignment operator was >> a mistake too. > > If there is no assignment operator, you need something else to build it > upon. I was talking about syntax. There is no need to have it a statement. Assignment could have been an operation, without the result, if we wanted to prevent it appearing in the middle of an expression. However, since Ada 2012 allowed if-then-else expression, in-out parameters of functions, it becomes difficult to defend the status of assignment as a statement. Not that I welcome if-then-else expression or would assignments returning results. > A dictionary, perhaps? But now, you wanted that in the library, too. > It seems to be that the choice between syntax and library support is a > matter of taste - but this makes it even further from being an objective > definition. Nope, it the difference between syntax and semantics. You shall not burden syntax with semantics unless absolutely required. There is nothing special in assignment's semantics comparing to the semantics of other subprograms. Thus it does not deserve special syntax. This is not related to the question should the language provide operator ":=" or not. The former is semantics, the latter is syntax. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de