comp.lang.ada
 help / color / mirror / Atom feed
From: "Vinzent Hoefler" <nntp-2010-10@t-domaingrabbing.de>
Subject: Re: Ada is getting more popular!
Date: Wed, 13 Oct 2010 22:17:45 +0200
Date: 2010-10-13T22:17:45+02:00	[thread overview]
Message-ID: <op.vki6nvk20k3wt7@jellix.jlfencey.com> (raw)
In-Reply-To: bbe0c03c-6afd-40de-bf9e-04aa04b53504@n7g2000vbo.googlegroups.com

On Wed, 13 Oct 2010 14:07:13 +0200, ramon_garcia <ramon.garcia.f@gmail.com> wrote:

> - Vendor dependency: there are few vendors of Ada products. It is
> neccessary in practice to use vendor extensions to write useful
> software.

Then you are most probably doing something wrong.

> For instance, I must depend on array accesses in GNAT
> containing both the addess and the bounds of the array.

Why?

> In addition, I
> also depend on the implementation recomendation that array'adress
> points to the first element.

I don't get it. From what you describe it seems you are programming
C-style. I've never used 'Address except for hardware-dependent and
thus inherently unportable stuff.

> - Complex language that requries plenty of typing.

That's by design. Actually, I like it. It makes reading the source code
so much easier.

> At least I would expect to have an option "new package" that defines
> a package spec and body.

Huh? For these four lines? And if you really need that, write a small
Python plug-in. ;)

Something along the lines:

-- 8< --
def Create_Package (Name):
    Spec_File = GPS.File (Name + ".ads")
    Spec_File.set_property ("language", "ada")
    Editor = GPS.EditorBuffer.get(Spec_File)
    Start  = Editor.beginning_of_buffer()
    Editor.insert (Start, '\n'.join ([' '.join (["package", Name, "is"]), ' '.join (["end", Name]) + ";"]))
    Editor.save()

    Body_File = GPS.File (Name + ".adb")
    Body_File.set_property ("language", "ada")
    Editor = GPS.EditorBuffer.get(Body_File)
    Start  = Editor.beginning_of_buffer()
    Editor.insert (Start, '\n'.join ([' '.join (["package", "body", Name, "is"]), ' '.join (["end", Name]) + ";"]))
    Editor.save()
-- 8< --

> Or that declaring a
> function in the spec creates an empty body (this is posible in Emacs,
> but not in GPS, only creating all the body from all the spec with gnat-
> stub rather than adding a function to the body from a new function to
> the spec).

Same here. I'm too lazy to write a script for that right now.

> - Missing language features. Such a complex language must have design
> issues. I find suprising that Object'Pool_Address extension from GNAT
> is not standard. (It is a little inconsistent and bogus, by the way).
> Some things are almost imposible or require difficult contorsions. For
> instnace, I have not yet found a reasonable way to insert an array of
> discriminated elements in a discriminated record. Something like
>
> type my_container(counter: integer, discriminated_attribute: integer)
> is record
>    data: array(0..counter) of contained(discriminated_attribute);
> end record;

The to-be-inserted record type must have a default discriminant.

type Disc_Array is array (Positive range <>) of Discriminated_Record;

type My_Container (Counter : Positive) is
    record
       Data : Disc_Array (1 .. Counter);
    end record;

That should do the trick. Of course, you need to have an initialization
operation then and the array elements may have different discriminants.

> This straightforward way is not posible because one cannot use an
> anonymous array type inside a record (by the way, I find this feature
> unjustified).

Well, considering that you probably want to operate on the array in
some way or another it must have a type. Otherwise you can't declare
operations for it. So, not allowing anonymous array types has some
value here.

> But, even defining a type for the array does not work
> because there is no way of passing the attribute from my_container to
> the contained elements.

Yes, because it has to be static. See above.

> For instance, think about a data structure like
>
> m, n: integer
>
> m times:
>     flaga: boolean;
>     array of n bytes;
>
> The desiable way of representing this model is imposible.

No. It's just not possible in the way you'd like to shove it
up the compiler's butt. ;)

> This is just an example of a particular issue that I find. The concept
> is that a complex design has many rough edges.

It has something to do with compilability. If the compiler can't figure
out the size for the object, it can't create it. So there's no point in
allowing arbitrary constructs.


Vinzent.

-- 
There is no signature.



  parent reply	other threads:[~2010-10-13 20:17 UTC|newest]

Thread overview: 128+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-13  7:15 Ada is getting more popular! Nasser M. Abbasi
2010-10-13 12:07 ` ramon_garcia
2010-10-13 14:51   ` Georg Bauhaus
2010-10-13 17:00     ` Dmitry A. Kazakov
2010-10-14 22:10       ` Robert A Duff
2010-10-15  7:27         ` Dmitry A. Kazakov
2010-10-13 15:04   ` Mark Lorenzen
2010-10-13 18:01   ` Jeffrey Carter
2010-10-13 18:50     ` mockturtle
2010-10-13 21:53     ` ramon_garcia
2010-10-13 22:34       ` Vinzent Hoefler
2010-10-13 22:49         ` Nasser M. Abbasi
2010-10-13 23:00           ` ramon_garcia
2010-10-13 23:21             ` Jeffrey Carter
2010-10-14  0:57             ` Georg Bauhaus
2010-10-15 12:12             ` Jacob Sparre Andersen
2010-10-24 22:10               ` Yannick Duchêne (Hibou57)
2010-10-13 22:49         ` ramon_garcia
2010-10-13 23:05           ` Vinzent Hoefler
2010-10-14  4:59             ` Simon Wright
2010-10-14 18:45               ` Vinzent Hoefler
2010-10-14 18:48                 ` Vinzent Hoefler
     [not found]       ` <i95f0n$j61$1@tornado.tornevall.net>
2010-10-14  5:03         ` Simon Wright
2010-10-13 20:17   ` Vinzent Hoefler [this message]
2010-10-13 22:05   ` Simon Wright
2010-10-14  2:20   ` tmoran
2010-10-24 22:15     ` Yannick Duchêne (Hibou57)
2010-10-25  0:14       ` Georg Bauhaus
2010-10-24 21:21   ` Yannick Duchêne (Hibou57)
2010-10-25  0:12     ` Georg Bauhaus
2010-10-25  7:43       ` Yannick Duchêne (Hibou57)
2010-10-25  7:52       ` Dmitry A. Kazakov
2010-10-25  8:07         ` Georg Bauhaus
2010-10-25  9:21           ` Dmitry A. Kazakov
2010-10-25  9:47         ` Ludovic Brenta
2010-10-25 10:33           ` Dmitry A. Kazakov
2010-10-25 11:00             ` Ludovic Brenta
2010-10-25 13:24               ` Dmitry A. Kazakov
2010-10-31 19:59                 ` Yannick Duchêne (Hibou57)
2010-10-25 19:06               ` Yannick Duchêne (Hibou57)
2010-10-25 22:39                 ` Thomas Løcke
2010-10-25 23:29                   ` Yannick Duchêne (Hibou57)
2010-10-26  6:29                     ` Thomas Løcke
2010-10-26 14:33                       ` Colin Paul Gloster
2010-10-26 13:59                         ` Dmitry A. Kazakov
2010-10-27 11:59                           ` Colin Paul Gloster
2010-10-27 13:07                             ` Dmitry A. Kazakov
2010-10-27 17:51                               ` Laziness (Was: Re: Ada is getting more popular!) Jeffrey Carter
2010-10-27 20:51                                 ` Yannick Duchêne (Hibou57)
2010-11-03 18:02                               ` Ada is getting more popular! Colin Paul Gloster
2010-11-03 20:52                                 ` Dmitry A. Kazakov
2010-11-04  1:27                                   ` Yannick Duchêne (Hibou57)
2010-11-04  1:30                                 ` Yannick Duchêne (Hibou57)
2010-10-26 18:29                         ` Thomas Løcke
2010-10-27 11:32                           ` Colin Paul Gloster
2010-10-27 19:28                             ` Thomas Løcke
2010-10-27 19:38                               ` Thomas Løcke
2010-10-27 20:46                               ` Yannick Duchêne (Hibou57)
2010-10-28  6:06                                 ` Thomas Løcke
2010-10-28  8:19                                   ` Dmitry A. Kazakov
2010-10-28  9:41                                     ` Thomas Løcke
2010-10-28 13:01                                       ` Dmitry A. Kazakov
2010-10-28 18:21                                         ` Thomas Løcke
2010-10-28 20:18                                           ` Dmitry A. Kazakov
2010-10-28 20:33                                             ` Ludovic Brenta
2010-10-28 21:19                                               ` Dmitry A. Kazakov
2010-10-28 23:37                                                 ` Georg Bauhaus
2010-10-29  8:00                                                   ` Dmitry A. Kazakov
2010-10-29  9:19                                                     ` Georg Bauhaus
2010-10-29 10:03                                                       ` Dmitry A. Kazakov
2010-10-29 16:55                                                       ` Yannick Duchêne (Hibou57)
2010-10-30  9:50                                                       ` Florian Weimer
2010-10-30 12:58                                                         ` Georg Bauhaus
2010-10-30 17:48                                                           ` Florian Weimer
2010-10-30 18:50                                                             ` Yannick Duchêne (Hibou57)
2010-10-30 19:02                                                             ` Georg Bauhaus
2010-10-30 19:26                                                               ` Dmitry A. Kazakov
2010-10-30 20:57                                                                 ` Georg Bauhaus
2010-10-31  7:48                                                                   ` Dmitry A. Kazakov
2010-10-31 10:59                                                                     ` Georg Bauhaus
2010-10-31 12:36                                                                       ` Dmitry A. Kazakov
2010-10-30 18:17                                                           ` Yannick Duchêne (Hibou57)
2010-10-29 16:51                                                     ` Yannick Duchêne (Hibou57)
2010-10-28 21:02                                             ` Thomas Løcke
2010-10-28 21:31                                               ` Dmitry A. Kazakov
2010-10-28 21:28                                           ` Brian Drummond
2010-10-29  5:13                                             ` Thomas Løcke
2010-10-29 14:04                                               ` Brian Drummond
2010-10-29 14:03                                                 ` Thomas Løcke
2010-10-30  6:23                                                   ` Brian Drummond
2010-10-29  0:31                                       ` Chad  R. Meiners
2010-10-29 11:47                                       ` stefan-lucks
2010-10-28 17:25                                     ` Warren
2010-10-28  9:12                                   ` J-P. Rosen
2010-10-28 17:02                                     ` Yannick Duchêne (Hibou57)
2010-10-28 17:58                                     ` Nicholas Collin Paul Gloster
2010-10-28 18:17                                       ` J-P. Rosen
2010-10-29 18:59                                         ` Vinzent Hoefler
2010-10-29 19:56                                           ` Yannick Duchêne (Hibou57)
2010-10-29 20:28                                             ` J-P. Rosen
2010-10-29 21:51                                               ` Yannick Duchêne (Hibou57)
2010-10-31  1:35                                               ` Yannick Duchêne (Hibou57)
2010-10-31  5:02                                                 ` Yannick Duchêne (Hibou57)
2010-10-31  6:42                                                   ` Yannick Duchêne (Hibou57)
2010-10-31 10:38                                                   ` J-P. Rosen
2010-10-31 10:54                                                     ` Dmitry A. Kazakov
2010-10-31 12:54                                                       ` J-P. Rosen
2010-10-31 14:57                                                         ` Dmitry A. Kazakov
2010-10-31 13:57                                                       ` Niklas Holsti
2010-10-31 21:02                                                         ` Niklas Holsti
2010-11-02  9:15                                                           ` J-P. Rosen
2010-10-31 14:39                                                       ` Yannick Duchêne (Hibou57)
2010-10-31 17:21                                                       ` Jeffrey Carter
2010-10-31 18:04                                                       ` Jeffrey Carter
2010-10-31 20:00                                                         ` Dmitry A. Kazakov
2010-10-31 18:06                                                     ` Jeffrey Carter
2010-10-30  0:01                                             ` Vinzent Hoefler
2010-10-30  0:30                                               ` Yannick Duchêne (Hibou57)
2010-10-30 17:00                                                 ` Vinzent Hoefler
2010-10-26  0:10                   ` Yannick Duchêne (Hibou57)
2010-10-25 12:06             ` Georg Bauhaus
2010-10-25 13:41               ` Dmitry A. Kazakov
2010-10-25 14:55                 ` Georg Bauhaus
2010-10-25 19:33             ` Yannick Duchêne (Hibou57)
2010-10-26 20:37             ` Shark8
2010-10-25 11:49           ` J-P. Rosen
2010-10-25 19:58             ` Yannick Duchêne (Hibou57)
2010-10-25 19:17           ` 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