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: border1.nntp.dca3.giganews.com!backlog3.nntp.dca3.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nac.net!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!news.stack.nl!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 08:52:25 +0200 Organization: cbb software GmbH Message-ID: <1lk5etrvv7sy2$.p7h015lw2pmn$.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> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: AuYlnUSfTZrfhAkRjyySpQ.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 X-Original-Bytes: 3833 Xref: number.nntp.dca.giganews.com comp.lang.ada:186916 Date: 2014-06-15T08:52:25+02:00 List-Id: On Sat, 14 Jun 2014 14:05:17 -0700 (PDT), Maciej Sobczak wrote: > W dniu piątek, 13 czerwca 2014 10:36:49 UTC+2 użytkownik Dmitry A. Kazakov napisał: > >> 1. From the language design POV, everything possible must be moved out the >> language into the library. > > What if we treat the standard library as part of the language? It would be self-contradictory. A library is defined in the language terms, it cannot be a part of itself. > Anyway, the > border is fuzzy, as there are things at the library level that require > dedicated language magic to work. You mean a special treatment of the same language construct when it appears in the standard library? >> 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. It is possible to write a program in assembly language that would expose the same functionality as a program in a higher-level language with containers. That does not make assembly language having containers. Compare: * and [] operators do not make C having arrays. >> If Ada were a worse language containers must have been >> implemented at the language level. > > This is an extremist view and quite unfounded. > > Let try: dynamic memory. Ada has a built-in operator (new) for dynamic > allocation of objects. The C programming language move the dynamic > allocation to the library (malloc and friends). How would you compare > these two approaches in terms of the language being better or worse? Operator new was a mistake, excusable for early 80's. It is especially obvious since deallocator is not an operator. BTW, assignment operator was a mistake too. There existed reasons for both decisions and others (like stream I/O attributes), because making these proper subprograms would require at lot of work on the type system. Which was not done then, and is not complete now. >> 2. Associative arrays are made by their non-functional requirements. The >> implementations hugely differ if task-safety, persistence, search/index >> heuristics required/available. > > 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. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de