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,FREEMAIL_FROM autolearn=ham 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 ti10mr1661125pbc.5.1328802608557; Thu, 09 Feb 2012 07:50:08 -0800 (PST) Path: wr5ni5371pbc.0!nntp.google.com!news1.google.com!volia.net!news2.volia.net!feed-A.news.volia.net!news.musoftware.de!wum.musoftware.de!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!gegeweb.org!aioe.org!.POSTED!not-for-mail From: =?utf-8?Q?Yannick_Duch=C3=AAne_=28Hibou57?= =?utf-8?Q?=29?= Newsgroups: comp.lang.ada Subject: Re: ada without ada libraries? Date: Thu, 09 Feb 2012 16:50:05 +0100 Organization: Ada @ Home Message-ID: References: <82mx8tttx7.fsf@stephe-leake.org> <120f2efrm73fc$.mi1m9kwbbkes$.dlg@40tude.net> <1o71uiwmoiunb.bkjz8c54rcbl.dlg@40tude.net> NNTP-Posting-Host: fLpVuVo6AZx9Xe9YP2dkPw.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: Opera Mail/11.61 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable Date: 2012-02-09T16:50:05+01:00 List-Id: Le Thu, 09 Feb 2012 15:40:40 +0100, Dmitry A. Kazakov = a =C3=A9crit: > On Thu, 09 Feb 2012 14:42:02 +0100, Yannick Duch=C3=AAne (Hibou57) wro= te: > >> Le Thu, 09 Feb 2012 11:45:31 +0100, Dmitry A. Kazakov >> a =C3=A9crit: >>>> 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 le= vel >> models. All languages comes with their own model, even natural langua= ge >> (people are just not aware of that fact). > > Maybe, but why this model must be "an universal model of everything" i= n > order to be able to program finite state automata (which modern comput= ers > 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 ty= pe = 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=E2=80=91like) language with a package or set of packag= e acting = as a specific engine. At best you always end with syntax limitation whic= h = make the whole not expressive, or with the need to go with a whole = compiler where a single application could be enough. >>> If you want to be serious in pushing your argument, you have to show= = >>> how >>> and why the domain's specific fails to fit into a strongly typed, >>> imperative, OO framework. >> >> First is readability. > > Huh, I remember a description of a 8-channel input device in such a > language. The text file containing it was 40 Kb long. > > These languages are absolutely, ultimately unreadable, fully of useles= s > syntactic garbage and thousands of keywords of which nobody cared to = > define > what they are supposed to mean. May be too big language (PL/I syndrom?). I don't know this =E2=80=9Cdesc= ription of = a 8=E2=80=91channel input device=E2=80=9D. By the way, the way you talk = about it, seems to = suggest this was a description language; not the same purpose as Ada. = Persisting in a bad choice is not a problem bring by DSL, that's a human= = problem. >> Using Ada for >> some things, would be like using assembly instead of Ada. > > Nope. Ada provides abstraction means based on ADTs, OO and packages. O= n > this measure DSLs are assemblers, as they provide practically no means= = > for > encapsulation, abstraction, refactoring, reuse. Some domain simply don't need this. The only thing they may need in this= = area, is typically package=E2=80=91like structure, to organize and manag= e large = source. And this is not even a requirement, as the need come at some sca= le = only. > This requires a proof. If you don't claim a need in a very special syn= tax > (e.g. MatLab/SIMULINK), you cannot make an argument here. One of the purpose of a DSL is to provide a special syntax. > Really? How many *declarative* scripting languages are in use? I said elsewhere (just my personal feeling), those scripting languages a= ll = over the place, are not DSL. They are just I don't know what which is = supposed to avoid compilation even for long time running application and= = run on any platform, kind of virtual machine, and often virtual = environment, as they typically come with their own set of libraries, own= = installation system, own UI, etc. All of these scripting languages are = just a failure to either solve or simply accept the fact there exist = multiple environments which are all different enough (scripting language= = is for viral software?). Or else, failure to accept what the nature of a= = software is, something quickly becoming complex and requiring some = learning stage ahead. That's not the DSL topic, that's another topic. A = = DSL may be compiled or interpreted, and will typically be a tiny languag= e = (not required, as mathematics shows). >> What would be a real mess, would be an attempt to express Prolog clau= ses >> with Ada arrays (arrays with anonymous types, of course; don't even = >> think >> about named array sub=E2=80=91types). > > I see no problem to have a decent way do describe inference rules in A= da = > by > overriding "and", "or", "=3D" 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? And you will have to distribute an Ada compiler an= d = make people use it every time? Distribute with a wrapper? When just a = dedicated engine or interpreter is required, what a whole Ada compiler = have to afford? > But SQL miserably fails as a language of relation algebra. I think tha= t = > an > Ada implementation based on aggregates to describe tuples would be muc= h > better. If ARG concentrated on improving the Ada's type system rather = = > than > on hacking limited returns and exception throwing comments, Ada could > certainly be perfect for that. > > Apart from the fact that a relational DB is not the brightest idea in = the > world, when it comes to the objects just a bit more complex than integ= er = > or > string. > > Here is where your fine idea of DSL collapses. There is no insulated > domains. Any specific language is turns unsuitable when faces the real= > world. Program power set in SQL or path finding in SIMULINK... Yes, I agree. -- = =E2=80=9CSyntactic sugar causes cancer of the semi-colons.=E2=80=9D [1] =E2=80=9CStructured Programming supports the law of the excluded muddle.= =E2=80=9D [1] [1]: Epigrams on Programming =E2=80=94 Alan J. =E2=80=94 P. Yale Univers= ity