bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: breaking dependencies


From: Bruno Haible
Subject: Re: breaking dependencies
Date: Sat, 19 Feb 2011 02:12:07 +0100
User-agent: KMail/1.9.9

Hi Paul, all,

> If we can break the dependencies at a relatively
> small cost, we should do that.

Yes, that's what Sam Steingold has been asking for, for years.

The costs that I can see are two-fold:

  1) Additional modules; users have to read some documentation
     before they can decide whether they need, say, 'strstr' or
     'strstr-simple'.

  2) When we duplicate a workaround idiom in several files, and the
     workaround has to be extended, it's easy to miss some of
     the occurrences of the idiom. For example, for including
     <wctype.h>, we did

       #include <wchar.h>
       #include <wctype.h>

     and then later discovered that we need to write

       #include <stdio.h>
       #include <time.h>
       #include <wchar.h>
       #include <wctype.h>

     and then again later found out that we need to write

       #include <stddef.h>
       #include <stdio.h>
       #include <time.h>
       #include <wchar.h>
       #include <wctype.h>

> What we've done in the past is
> take a pragmatic approach: we support all the features that
> are generally needed by a stdlib's users or are easy to
> support, but when there's a definite cost for a feature that
> hardly anybody uses, we partition it off into an extra module.

Yup. And our estimation has been that code size is a cost -
which is why 'snprintf-posix' is a separate module from 'snprintf' -
but that .h files and .m4 macros come at virtually no cost.

Bruno
-- 
In memoriam Khosrow Golsorkhi <http://en.wikipedia.org/wiki/Khosrow_Golsorkhi>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]