Boost logo

Boost Users :

From: Edward Diener (eddielee_at_[hidden])
Date: 2004-07-03 07:50:33


Vladimir Prus wrote:
> Edward Diener wrote:
>
>>> Yea, but whether as two separate file or one file, the size is still
>>> twice as large. E.g. if on a typical Linux system, just one
>>> application uses wide version, you have to install both wide and
>>> narrow version. Here on my box, the size of /usr/lib in 1.2G. Making
>>> it into 2.4G does not seem right ;-)
>>
>> Why would you install both a narrow character version and a wide
>> character version if you are only going to use one or the other ? Of
>> course if you have applications which use both, you need to install
>> both, but that doesn't make every application twice as large.
>
> I had in mind situation where there are two applications -- one which
> uses narrow version and another which uses wide version. If each
> library is used by several apps -- which is likely, and not all those
> apps agree and narrow/wide question, you really need to install two
> versions for each library.

I don't understand what you are saying in the penultimate clause "and not
all those apps agree and narrow/wide question". If an application uses both
the narrow and wide versions of a library, then of course it will have to
include both of them. My own experience is that most applications will use
one or the other. An application built for the international market will
probably use the wide character implementation, else if it is built only for
languages whose encoding can be represented by the 256 code points of the
narrow character set, it will use the narrow character implementation. This
is the normal way libraries are used. One pays for what one uses.

I think C++ should have template specializations for all of its native
character types in its standard libraries whenever a character is being used
properly as a native character type type. Currently C++ has two native
character types, 'char' and wchar_t'. In the future who knows whether ot not
other native character types will be added, perhaps a specific Unicode type.
Using templates, and having specializations of its native character types,
makes it much easier for C++ to adapt other future character types as native
character types. Even when other native character types are not added to
C++, creating one's own implementations of character types is much easier
when templates and specializations are used. We have this wonderful facility
in the C++ language, templates. Not using it, because an application might
have to use different character types and include more than one
specialization, seems illogical to me.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net