comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R. Carter" <spam.jrcarter.not@acm.nospam.org>
Subject: Re: System calls - GNAT library vs. direct bindings
Date: Fri, 01 Jun 2007 17:42:36 GMT
Date: 2007-06-01T17:42:36+00:00	[thread overview]
Message-ID: <gUY7i.143046$_c5.113755@attbi_s22> (raw)
In-Reply-To: <1180623520.303981.191090@q75g2000hsh.googlegroups.com>

Maciej Sobczak wrote:
> 
> 1. The advantage of using GNAT library is portability across various
> systems that are targeted by GNAT. (I assume that the GNAT library is
> available outside of POSIX - if not, please correct me.)
> 
> 2. The advantage of writing custom thin wrappers is portability across
> various compilers that target POSIX platforms.
> 
> The first is not really important for me, I will probably use only
> POSIX systems.
> The seconds is not important neither, I will probably use only GNAT.
> 
> In other words - the focus for evaluation should go elsewhere.
> Performance? Maintainability? Some other factors?

It's usually better to reuse something that has been widely used than to 
recreate the wheel. Reuse is generally less effort than creating a new 
library. An existing library is usually better tested and has fewer 
errors than a custom library. And an existing library's maintenance is 
generally not part of your project's maintenance effort, while a custom 
library's maintenance is.

Portability is generally a good thing, even if you don't think you need 
it. Many systems that were created under the assumption that portability 
wasn't an issue were later ported at greater effort than would have been 
involved in creating them to be portable in the 1st place.

To my mind, given the existence of a library that is portable across 
compilers and platforms, such a library should be used. In the absence 
of such a library, but given the existence of an existing library such 
as GNAT's, I'd probably choose the existing library, but would add a 
wrapper around it in case I need to use another compiler. Only in the 
absence of any existing libraries would I write my own, and I'd try to 
make it portable across compilers and platforms.

-- 
Jeff Carter
"Why don't you bore a hole in yourself and let the sap run out?"
Horse Feathers
49



  parent reply	other threads:[~2007-06-01 17:42 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-31 14:58 System calls - GNAT library vs. direct bindings Maciej Sobczak
2007-05-31 15:06 ` Ludovic Brenta
2007-05-31 15:23   ` Maciej Sobczak
2007-05-31 16:14     ` Ludovic Brenta
2007-05-31 19:08       ` Michael Bode
2007-05-31 19:48         ` Markus E Leypold
2007-05-31 20:07 ` Simon Wright
2007-05-31 21:10   ` Georg Bauhaus
2007-06-01 19:50     ` Simon Wright
2007-06-01  6:27   ` Maciej Sobczak
2007-06-01 19:29     ` Simon Wright
2007-06-01  6:59 ` anon
2007-06-01 10:17   ` Markus E Leypold
2007-06-01 13:01   ` Maciej Sobczak
2007-06-01 20:13   ` Pascal Obry
2007-06-01 20:35     ` Pascal Obry
2007-06-01 17:42 ` Jeffrey R. Carter [this message]
2007-06-01 19:32   ` Simon Wright
2007-06-01 20:45   ` Maciej Sobczak
2007-06-02  5:35     ` Jeffrey R. Carter
replies disabled

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