comp.lang.ada
 help / color / mirror / Atom feed
From: "Yannick Duchêne (Hibou57)" <yannick_duchene@yahoo.fr>
Subject: Re: ada without ada libraries?
Date: Thu, 09 Feb 2012 16:50:05 +0100
Date: 2012-02-09T16:50:05+01:00	[thread overview]
Message-ID: <op.v9e4xrjyule2fv@douda-yannick> (raw)
In-Reply-To: uq2hfw3mn5gt.11c0w3xxy56pu.dlg@40tude.net

Le Thu, 09 Feb 2012 15:40:40 +0100, Dmitry A. Kazakov  
<mailbox@dmitry-kazakov.de> 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
>> <mailbox@dmitry-kazakov.de> 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.


>>> 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 useless
> 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 “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.  
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. On
> 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‑like structure, to organize and manage large  
source. And this is not even a requirement, as the need come at some scale  
only.

> 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.

> Really? How many *declarative* scripting languages are in use?

I said elsewhere (just my personal feeling), those scripting languages all  
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 language  
(not required, as mathematics shows).


>> 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? And you will have to distribute an Ada compiler and  
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 that  
> an
> Ada implementation based on aggregates to describe tuples would be much
> 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 integer  
> 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.


-- 
“Syntactic sugar causes cancer of the semi-colons.” [1]
“Structured Programming supports the law of the excluded muddle.” [1]
[1]: Epigrams on Programming — Alan J. — P. Yale University



  reply	other threads:[~2012-02-09 15:50 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-07 21:14 ada without ada libraries? Patrick
2012-02-08  2:04 ` BrianG
2012-02-08  3:11 ` Gautier write-only
2012-02-08  8:35 ` tonyg
2012-02-08  9:10 ` Simon Wright
2012-02-08 12:02 ` Stephen Leake
2012-02-08 13:07   ` Dmitry A. Kazakov
2012-02-08 21:10     ` Patrick
2012-02-08 21:39       ` Gautier write-only
2012-02-09  2:11       ` Shark8
2012-02-09  2:08     ` Shark8
2012-02-09  3:43       ` Jeffrey Carter
2012-02-09  4:17         ` Shark8
2012-02-09 12:26         ` mockturtle
2012-02-09  8:34       ` Dmitry A. Kazakov
2012-02-09  9:55         ` Yannick Duchêne (Hibou57)
2012-02-09 10:45           ` Dmitry A. Kazakov
2012-02-09 11:08             ` Gautier write-only
2012-02-09 13:48               ` Georg Bauhaus
2012-02-09 14:17                 ` Yannick Duchêne (Hibou57)
2012-02-09 14:05               ` Yannick Duchêne (Hibou57)
2012-02-09 16:47               ` Pascal Obry
2012-02-09 17:03                 ` Yannick Duchêne (Hibou57)
2012-02-09 17:08                   ` Yannick Duchêne (Hibou57)
2012-02-09 17:26                   ` Pascal Obry
2012-02-10  0:51                     ` Randy Brukardt
2012-02-09 17:31                   ` Dmitry A. Kazakov
2012-02-09 13:42             ` Yannick Duchêne (Hibou57)
2012-02-09 14:40               ` Dmitry A. Kazakov
2012-02-09 15:50                 ` Yannick Duchêne (Hibou57) [this message]
2012-02-09 17:21                   ` Dmitry A. Kazakov
2012-02-09 17:44                     ` Yannick Duchêne (Hibou57)
2012-02-10  0:56                 ` Randy Brukardt
2012-02-10  9:38                   ` Dmitry A. Kazakov
2012-02-14 19:08                 ` Yannick Duchêne (Hibou57)
2012-02-09 13:42             ` Yannick Duchêne (Hibou57)
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox