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 X-Google-Thread: 103376,508516c114ade8e1 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Received: by 10.68.231.202 with SMTP id ti10mr1842651pbc.5.1328808123344; Thu, 09 Feb 2012 09:22:03 -0800 (PST) Path: wr5ni5608pbc.0!nntp.google.com!news2.google.com!goblin1!goblin.stu.neva.ru!news.tornevall.net!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: ada without ada libraries? Date: Thu, 9 Feb 2012 18:21:57 +0100 Organization: cbb software GmbH Message-ID: <16zsb2ei9nnyh$.s39a8xtdr1n8.dlg@40tude.net> References: <82mx8tttx7.fsf@stephe-leake.org> <120f2efrm73fc$.mi1m9kwbbkes$.dlg@40tude.net> <1o71uiwmoiunb.bkjz8c54rcbl.dlg@40tude.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: trR2WuoGABtEWk7YPfvgdQ.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Date: 2012-02-09T18:21:57+01:00 List-Id: On Thu, 09 Feb 2012 16:50:05 +0100, Yannick Duchêne (Hibou57) wrote: > Le Thu, 09 Feb 2012 15:40:40 +0100, Dmitry A. Kazakov > a écrit: > >> On Thu, 09 Feb 2012 14:42:02 +0100, Yannick Duchêne (Hibou57) wrote: >> >>> Le Thu, 09 Feb 2012 11:45:31 +0100, Dmitry A. Kazakov >>> a écrit: >>>>> No language at all, >>>>> not even Ada, could be an universal model for everything. >>>> >>>> Since when a language became a model? >>> >>> Always been for me. I see Ada as a language providing a set of low level >>> models. All languages comes with their own model, even natural language >>> (people are just not aware of that fact). >> >> Maybe, but why this model must be "an universal model of everything" in >> order to be able to program finite state automata (which modern computers >> are)? > > When you created a specific model, you can hide implementation part. Ada > do this, and DSL do the same. Specific syntactic construct goes one step > above that, as it disallow to go outside of the domain, just like Ada > disallow (except with that specific generic subprogram) to bypass the type > system. DSL is when you need an hight level model and only that. I > understood what you mean, and believe me I already though about using > plain Ada (or Ada‑like) language with a package or set of package acting > as a specific engine. At best you always end with syntax limitation which > make the whole not expressive, or with the need to go with a whole > compiler where a single application could be enough. Thus it is not universal and it boils down solely to the syntax? Now you have a more difficult part showing that fancy syntax is sufficiently better to map the domain and is still in the class of formal languages compilable as well as readable by a human reader. I *bet* that in the class of languages based on Latin script texts (to leave graphical languages aside), there is nothing better than the syntax of conventional languages like Ada. > May be too big language (PL/I syndrom?). I don't know this “description of > a 8‑channel input device”. By the way, the way you talk about it, seems to > suggest this was a description language; not the same purpose as Ada. Yes, it is declarative. ASAP2 is that tells you anything. If not, you are a lucky man. > Persisting in a bad choice is not a problem bring by DSL, that's a human > problem. The idea of DSL is a human problem too. Groups of peoples used to identify themselves using some secretive languages, e.g. signs of Freemasonry etc... If you compare it to natural languages you will notice that all domain specific ones (e.g. professional jargons, ritual languages etc), do not even reach the level of a dialect suitable for simplest talk. I would argue that the situation with programming languages is same. In the end you need just one programming language for everything that can be put down as a text. >>> Using Ada for >>> some things, would be like using assembly instead of Ada. >> >> Nope. Ada provides abstraction means based on ADTs, OO and packages. On >> this measure DSLs are assemblers, as they provide practically no means for >> encapsulation, abstraction, refactoring, reuse. > > Some domain simply don't need this. No such domain exist. The need comes from the project size. Once the source code stops fitting one A4 page printed in Courier 10, you are in trouble. >> This requires a proof. If you don't claim a need in a very special syntax >> (e.g. MatLab/SIMULINK), you cannot make an argument here. > > One of the purpose of a DSL is to provide a special syntax. Yep, the only purpose of 50% of them is to have curly brackets, 30% - <> brackets, 20% - undecided. >>> What would be a real mess, would be an attempt to express Prolog clauses >>> with Ada arrays (arrays with anonymous types, of course; don't even think >>> about named array sub‑types). >> >> I see no problem to have a decent way do describe inference rules in Ada by >> overriding "and", "or", "=" etc. Look at GNAT Spitbol package. There is no >> big difference in describing patterns and rules of inference. This is >> basically the same stuff. > > For what added value? To have one language. > And you will have to distribute an Ada compiler and > make people use it every time? You need nothing but a library. Don't confuse the domains. The domain where you could use patterns is when the input is a text to match. It is not when the input is a pattern itself. Similarly, if the domain is logical inference, then the input is a statement for infer from, or a predicate to prove, and not the set of inference rules like Modus ponens. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de