This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Ada.Characters.{Wide_}Latin_9 should be deleted

David Starner <> writes:

> Ada.Characters.Latin_9 and Ada.Characters.Wide_Latin_9 are new packages
> added to GCC 3.2. In my opinion, both should be removed before release,
> with proper internationization added in their place if neccesary.

Unfortunately, adding proper i18n support for GNAT on GNU systems is
not possible: GNAT only supports a 16-bit Wide_Character type, but
wchar_t is 32 bit on GNU systems.  This means that it is cumbersome to
use the GNU facilities from Ada.  For example, if you add a new
(private) type for a character at your own, you can't use case
statements to process such characters, and you cannot declare string
constants in preelaborated packages.

It's not clear if Ada as a language will mandate or encourage the
provision of an UCS-4 encoded character type (there seems to be a
tenancy against it).  I strongly believe that we need such a type in
GNAT, for interoperation with the rest of the GNU system.  However, we
shouldn't create interfaces now which will become incompatible later.

> The reason is that hard coding character set into the code is a bad
> idea and that it's unreasonable and unhelpful to add one arbitrary
> new 8-bit character set to the Ada library. (Character.Wide_Latin_9
> has additional problems, as it creates a pseudo-Unicode.)

I agree.  At least Wide_Latin_9 is a serious mistake and has to be
removed.  I'll submit a patch.

I'm not so sure about Latin_9; maybe a distinct character type can be

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]