comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: ada without ada libraries?
Date: Thu, 9 Feb 2012 15:40:40 +0100
Date: 2012-02-09T15:40:40+01:00	[thread overview]
Message-ID: <uq2hfw3mn5gt.11c0w3xxy56pu.dlg@40tude.net> (raw)
In-Reply-To: op.v9ey0cppule2fv@douda-yannick

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)?

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

I don't claim that they could not be designed readable, but the fact that
they are usually developed by groups of engineers strikes any chance for
that. Language design is a very difficult task. There is no more than a
dozen of people in the world who could do that.

> 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. For an outsider they might
look so easy to use, but they are not. In my area all these languages end
up as programs generated automatically from other languages, and nobody
reads that mess.

> You could provide some package holding the  
> functionnalities of a DSL, a attempt to right what a DSL do in a simple  
> Ada program, but you will miss conciness and specifically designed context  
> which come with a DSL and help to focus on the DSL domain 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.

>> The only debatable position here is actually declarative vs. imperative.
>> But it won't fly with scripting languages anyway.
> 
> It precisely do.

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

>>> and some scripting
>>> languages, like LISP or derivatives, or logic programming languages,  
>>> are a
>>> kind of.
>>
>> ... mess.
> Either you use it badly, or it is just not well suited to you in  
> particular.

Rather they use me badly (:-)) I must touch them because in my realm
(automotive, energy) a lot of stuff is described in DSL languages.

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

> Similar comments could apply with others, including some as common as SQL is.

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

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



  reply	other threads:[~2012-02-09 14:40 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 [this message]
2012-02-09 15:50                 ` Yannick Duchêne (Hibou57)
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