comp.lang.ada
 help / color / mirror / Atom feed
From: Lutz Donnerhacke <lutz@iks-jena.de>
Subject: Re: Ada used in General Aviation (GA) applications?
Date: Thu, 13 May 2004 17:05:16 +0000 (UTC)
Date: 2004-05-13T17:05:16+00:00	[thread overview]
Message-ID: <slrnca7amb.18s.lutz@taranis.iks-jena.de> (raw)
In-Reply-To: ulljwqnrf.fsf@obry.org

* Pascal Obry wrote:
> And don't forget that this is just a wrong argument! When it comes to Ada
> you always hear "Well it takes time and money to leard a new langauge".
> Now let me ask some questions :
>
>    - What was the cost of learning C++ ?

Nothing. You can program for our customers in C while learning C++.
C++ is nothing more than C with Classes and the Template Library.

>    - What was the cost of learning Java/JSP/EJB/.../.../... ?

Nothing. You can program for our customers in C while learning Java.
Java is nothing more than C++ only using a sligthly different syntax.
The libs are easy to use: Just tune an example from the next website.

>    - What was (will be) the cost of learning C# and .NET ?

Nothing. You can program for our customers in C while learning C#.
C# is nothing more than C++ only using a sligthly different syntax.
.Net is easy to use: Just tune an example from the MSDN.

>    - What will be the cost of learning the next-super-mega-over-cool-language ?

Nothing. You can program for our customers in C while learning it.
It will be nothing more than C or C++ with a sligthly different syntax.
Examples are always available, because everbody uses it.

> I've never heard these arguments for other language that Ada, does it
> really cost nothing ?

It look other than C. You can't be productive while learning.
There are no examples on other websites how to implement the current task.

Of course Perl is more different, but Perl has CPAN.
Of course CPAN Modules are work in progress, if you are going deep, but
there are Modules for every fucking task. And all important modules are
written in C anyway ... So you can still programm in C while writing Perl.

There is a very simple, but important fact against Ada: The whole Network
and OS interfaces are written in C. Only a small part of the interfaces can
be imported into Ada, because the major list of system specific constants
are only available as preprocessor macros. It get worse if you need
structures.

So the main part of developing ordinary applications in Ada is writing a
seperate inferface to the system or the network. Nobody will pay for a list
of already defined constants. Of course, you can write a C wrapper in order
to get a interface, but this is silly. You will be expected to simply
include the system header files. So your language has to be C compatible as
much as possible. Interfacing with Ada is too expensive.

Not kidding :-(
\f
Reimplemented syslog(3) because this part of the libc is not thread safe:

...
   type Socket_Family is (PF_UNSPEC, PF_LOCAL);
   for Socket_Family use (
     PF_UNSPEC       => 0,
     PF_LOCAL        => 1
   );
   function PF_UNIX return Socket_Family renames PF_LOCAL;
   function PF_FILE return Socket_Family renames PF_LOCAL;

   type Socket_Addr(family : Socket_Family) is record
      case family is
	 when PF_LOCAL =>
	    path : String(1 .. 108);
	 when PF_UNSPEC =>
	    null;
      end case;
   end record;
   
   for Socket_Addr use record
      family at 0 range 0 .. 15;
      path   at 2 range 0 .. 108*8 - 1;
   end record;
   type Socket_Addr_Ptr is access constant Socket_Addr;
   
   log_file : aliased constant Socket_Addr := (
     family => PF_LOCAL,
     path   => "/dev/log" & (9 .. 108 => ASCII.NUL)
   );
   
   type Socket_Type is (SOCK_STREAM, SOCK_DGRAM, SOCK_RAW, SOCK_RDM,
     SOCK_SEQPACKET, SOCK_PACKET);
   for Socket_Type use (
     SOCK_STREAM => 1,
     SOCK_DGRAM => 2,
     SOCK_RAW => 3,
     SOCK_RDM => 4,
     SOCK_SEQPACKET => 5,
     SOCK_PACKET => 10
   );
   
   type File_Descriptor is new Integer;
   
   function c_socket(family : Socket_Family; mode : Socket_Type; protocol : Integer) return File_Descriptor;
   pragma Import(C, c_socket, "socket");
   
   procedure c_close(desc : File_Descriptor);
   pragma Import(C, c_close, "close");
   
   procedure c_sendto(socket : File_Descriptor;
     msg : String; msg_len : Natural;
     flag : Integer;
     addr : Socket_Addr_Ptr; addr_len : Natural
   );
   pragma Import(C, c_sendto, "sendto");
   
   procedure Send_To(Socket : File_Descriptor; Msg : String; To : Socket_Addr_Ptr) is
      pragma Inline(Send_To);
   begin
      c_sendto(Socket, Msg, Msg'Length, 0, To, To.all'Size / 8);
   end Send_To;
   
...



  reply	other threads:[~2004-05-13 17:05 UTC|newest]

Thread overview: 119+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-10  9:17 Ada used in General Aviation (GA) applications? Kai Glaesner
2004-05-10 11:39 ` Marin David Condic
2004-05-10 17:59   ` Jeffrey Carter
2004-05-11 11:38     ` Marin David Condic
2004-05-10 18:28   ` Bernd Specht
2004-05-10 20:10     ` Martin Dowie
2004-05-11  7:37       ` Dmitry A. Kazakov
2004-05-11  9:45         ` Bernd Specht
2004-05-11  9:52       ` Bernd Specht
2004-05-11 11:50         ` Marin David Condic
2004-05-12  0:07           ` Richard  Riehle
2004-05-12 12:21             ` Marin David Condic
2004-05-12 15:36             ` Robert C. Leif
2004-05-11 19:34         ` Bernd Trog
2004-05-11 20:46           ` Bernd Specht
2004-05-12 17:09             ` Mike Silva
2004-05-12 18:51               ` Bernd Specht
2004-05-13  5:50                 ` Pascal Obry
2004-05-13  7:21                 ` Vinzent 'Gadget' Hoefler
2004-05-13  8:10                   ` Bernd Specht
2004-05-13  8:57                     ` Vinzent 'Gadget' Hoefler
2004-05-13  9:27                     ` Ludovic Brenta
2004-05-13 11:46                     ` Marin David Condic
2004-05-13 19:20                       ` Randy Brukardt
2004-05-13 21:00                         ` tmoran
2004-05-13 23:41                         ` Alexander E. Kopilovich
2004-05-14  6:44                         ` Anders Wirzenius
2004-05-14 13:54                           ` Andersen Jacob Sparre
2004-05-17  5:27                             ` Anders Wirzenius
2004-05-17 11:53                             ` Marin David Condic
2004-05-14 22:31                           ` Ludovic Brenta
2004-05-15  9:05                             ` Jacob Sparre Andersen
2004-05-15 11:46                               ` Ludovic Brenta
2004-05-16 16:48                               ` Jeffrey Carter
2004-05-17  6:35                                 ` Time to market, was: " Anders Wirzenius
2004-05-17 12:17                                 ` Marin David Condic
2004-05-18  1:05                                   ` Jeffrey Carter
2004-05-18  7:58                                     ` Peter Amey
     [not found]                                     ` <40A9EFFC.7090708@noplace.com>
2004-05-19  0:45                                       ` Jeffrey Carter
2004-05-17 12:04                               ` Marin David Condic
2004-05-17  6:09                             ` Anders Wirzenius
2004-05-18  4:45                               ` Simon Wright
2004-05-17 11:58                             ` Marin David Condic
2004-05-17  6:15                           ` Martin Krischik
2004-05-17 11:48                         ` Marin David Condic
2004-05-13 16:45                     ` Pascal Obry
2004-05-13 17:05                       ` Lutz Donnerhacke [this message]
2004-05-13 20:59                         ` Bartłomiej Świercz
2004-05-13 21:06                         ` Pascal Obry
2004-05-14  1:07                           ` Alexander E. Kopilovich
2004-05-13 22:37                         ` Alexander E. Kopilovich
2004-05-14  6:41                         ` Ole-Hjalmar Kristensen
2004-05-13 19:30                     ` Bernd Trog
2004-05-13 16:17                   ` Mike Silva
2004-05-11 20:15         ` Martin Dowie
2004-05-12 12:30           ` Marin David Condic
2004-05-13  7:55             ` Dmitry A. Kazakov
2004-05-13 12:01               ` Marin David Condic
2004-05-13 13:22                 ` Dmitry A. Kazakov
2004-05-17 12:25                   ` Marin David Condic
2004-05-17 13:11                     ` Dmitry A. Kazakov
2004-05-13 19:29                 ` Randy Brukardt
2004-05-14 10:45                   ` Kai Glaesner
2004-05-14 22:35                     ` Ludovic Brenta
2004-05-17 12:26                   ` Marin David Condic
2004-05-17 19:29                     ` Randy Brukardt
2004-05-18  1:09                       ` Jeffrey Carter
     [not found]                         ` <40A9F260.9080300@noplace.com>
2004-05-19  0:50                           ` Jeffrey Carter
2004-05-19  1:34                             ` Marin David Condic
2004-06-06  9:48                         ` I R T
2004-05-18  4:50                       ` Simon Wright
     [not found]                         ` <40A9F38C.9080003@noplace.com>
2004-05-18 21:05                           ` Simon Wright
2004-06-06  9:51                             ` I R T
2004-05-18 12:05                       ` Marin David Condic
2004-05-19 17:17                         ` Randy Brukardt
2004-05-19 22:21                           ` Marin David Condic
2004-05-20 19:10                           ` Georg Bauhaus
2004-05-21 11:39                             ` Marin David Condic
2004-05-19 22:42                         ` Jeff C,
2004-05-20 11:36                           ` Marin David Condic
2004-05-21  1:46                             ` Jeff C,
2004-05-21  5:46                               ` Richard  Riehle
2004-05-21  5:44                             ` Simon Wright
2004-06-06 10:01                               ` I R T
2004-05-12  2:32         ` Steve
2004-05-12 12:34           ` Marin David Condic
2004-05-13  6:21         ` Richard  Riehle
2004-05-13  8:30           ` End of "discussion" (was Re: Ada used in General Aviation (GA) applications?) Bernd Specht
2004-05-13 15:14             ` Robert I. Eachus
2004-05-13 12:09           ` Ada used in General Aviation (GA) applications? Marin David Condic
2004-05-13 14:58           ` Martin Dowie
2004-05-13 20:37             ` Symbian OS (was: Re: Ada used in General Aviation (GA) applications?) Alexander E. Kopilovich
2004-05-11 11:41     ` Ada used in General Aviation (GA) applications? Marin David Condic
2004-05-11 17:28       ` Bernd Specht
2004-05-12 12:42         ` Marin David Condic
2004-05-13  8:00           ` Dmitry A. Kazakov
2004-05-12 10:01     ` Peter Amey
2004-05-12 12:50       ` Marin David Condic
2004-05-12 14:45         ` Georg Bauhaus
2004-05-13  7:43         ` Peter Amey
2004-05-13 12:17           ` Marin David Condic
2004-05-12 17:13       ` Mike Silva
2004-05-10 21:31 ` Ludovic Brenta
2004-05-11 11:29   ` Martin Dowie
2004-05-11 20:12     ` Martin Dowie
2004-05-11 14:29   ` Britt Snodgrass
2004-06-06  9:30 ` I R T
  -- strict thread matches above, loose matches on Subject: below --
2004-05-12  9:06 Lionel.DRAGHI
2004-05-12 12:52 ` Marin David Condic
2004-05-12 17:58 ` Bernd Specht
2004-05-12 18:13   ` Ludovic Brenta
2004-05-12 18:28     ` Mark Lorenzen
2004-05-13 13:31   ` Mike Silva
2004-05-12 14:25 Lionel.DRAGHI
2004-05-13  7:57 Lionel.DRAGHI
2004-05-13  8:39 Lionel.DRAGHI
2004-05-14 11:44 Lionel.DRAGHI
2004-05-14 18:11 ` Martin Dowie
2004-05-16 18:53   ` Robert I. Eachus
replies disabled

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