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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3a4656a5edc0dab4 X-Google-Attributes: gid103376,public Path: controlnews3.google.com!news1.google.com!newsfeed.stanford.edu!newsmi-us.news.garr.it!newsbo.news.garr.it!NewsITBone-GARR!newsfeed.cineca.it!newsfeed.nettuno.it!news-FFM2.ecrc.net!news.iks-jena.de!not-for-mail From: Lutz Donnerhacke Newsgroups: comp.lang.ada Subject: Re: Ada used in General Aviation (GA) applications? Date: Thu, 13 May 2004 17:05:16 +0000 (UTC) Organization: IKS GmbH Jena Message-ID: References: <409F69CB.8020604@noplace.com> <20619edc.0405120909.6ba1a793@posting.google.com> NNTP-Posting-Host: taranis.iks-jena.de X-Trace: branwen.iks-jena.de 1084467916 19139 217.17.192.37 (13 May 2004 17:05:16 GMT) X-Complaints-To: usenet@iks-jena.de NNTP-Posting-Date: Thu, 13 May 2004 17:05:16 +0000 (UTC) User-Agent: slrn/0.9.8.0 (Linux) Xref: controlnews3.google.com comp.lang.ada:551 Date: 2004-05-13T17:05:16+00:00 List-Id: * 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 :-( 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; ...