comp.lang.ada
 help / color / mirror / Atom feed
From: "Vasiliy Molostov" <molostoff@gmail.com>
Subject: Re: Suitability of Ada as a general-purpose language
Date: Sat, 04 Aug 2012 06:48:48 +0400
Date: 2012-08-04T06:48:48+04:00	[thread overview]
Message-ID: <op.wihwrmc7ka8ora@aspire.local> (raw)
In-Reply-To: op.wihb1pl7ule2fv@douda-yannick

Yannick Duchêne (Hibou57) <yannick_duchene@yahoo.fr> писал(а) в своём  
письме Fri, 03 Aug 2012 23:21:15 +0400:

> Le Tue, 31 Jul 2012 06:19:58 +0200, Randy Brukardt  
> <randy@rrsoftware.com> a écrit:

> Does that mean that “not decently sized” applications are not Ada's  
> target?

Ada main target are processors (hardware), while typical "Hello world"  
rely on console output and/or libc stdout file operations (e.g. implies  
file system operations, including mapping of errno to exceptions and the  
rest), and therefore it is for testing something about related to high  
level I/O primitives and are environment dependent. So, the test to  
establish and compare sizes of "Hello World" executable is dumb (due to  
irrelevant conclusions about result).

To get the benefit on image size a developer can restrict compiler with  
usual basic operations, e.g. to build "The Hello World program here, as a  
place‑holder for tiny applications" a developer can import I/O operations  
similar to competitors (since test environment is the same, I suppose),  
e.g. using puts(3) from libc instead of ada.text_io.put_line. In this case  
you might want to discover that these image sizes are closest to be  
similar to ones in C. With more ada related restrictions applied to ada  
compiler you can get image sizes even smaller than you can imagine.

How much Ada with gcc (e.g. GNAT) can take in image size was tested by  
Stephane Carrez
(see http://www.vacs.fr/wiki/index.php/VACS:Projects:Software:Gel - "GNU  
Ada compiler works for creation of a 256 bytes program"), obviously clear.

Regarding to Janus, on some targets its run-time is based on direct  
interfacing with environment, and the resulting image size can be even  
smaller than the same in C (where libc acts as an interface to the same  
environment).

As you can see, ada is just more flexible than C (or any other competitor)  
in building images of any desired/required size, and even makes this  
comparison incorrect and meaningless.

-- 
Написано в почтовом клиенте браузера Opera: http://www.opera.com/mail/



  parent reply	other threads:[~2012-08-10  4:21 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-30 11:43 Suitability of Ada as a general-purpose language Dufr
2012-07-30 12:12 ` Patrick
2012-07-30 12:37 ` Georg Bauhaus
2012-07-30 13:27   ` Patrick
2012-07-30 13:45     ` Dmitry A. Kazakov
2012-07-30 13:50       ` Patrick
2012-07-30 13:55         ` Patrick
2012-07-30 14:14         ` Dmitry A. Kazakov
2012-07-30 13:04 ` francois_fabien
2012-07-30 13:45 ` Vasiliy Molostov
2012-07-30 13:55   ` Vasiliy Molostov
2012-07-31 14:28   ` Marc C
2012-08-04 14:07     ` Vasiliy Molostov
2012-07-30 14:19 ` Ludovic Brenta
2012-07-30 14:34   ` Yannick Duchêne (Hibou57)
2012-07-30 15:26     ` Dufr
2012-07-30 16:05       ` Patrick
2012-07-30 16:11       ` Georg Bauhaus
2012-07-30 22:06       ` Brian Drummond
2012-07-31  4:19         ` Randy Brukardt
2012-08-03 19:21           ` Yannick Duchêne (Hibou57)
2012-08-03 20:21             ` Brian Drummond
2012-08-04  2:48             ` Vasiliy Molostov [this message]
2012-07-30 16:07 ` Ludovic Brenta
2012-07-30 16:45   ` Dmitry A. Kazakov
2012-07-30 18:03     ` Patrick
2012-07-30 19:33       ` Dufr
2012-07-30 20:04         ` Patrick
2012-08-06  9:01         ` Jacob Sparre Andersen
2012-08-06  9:15         ` Pascal Obry
2012-08-01 23:57 ` Lucretia
2012-08-06 20:52 ` gautier_niouzes
replies disabled

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