comp.lang.ada
 help / color / mirror / Atom feed
From: ytomino <aghia05@gmail.com>
Subject: Re: The extension of Is_Basic to unicode (about AI12-0260-1)
Date: Wed, 11 Apr 2018 16:57:10 -0700 (PDT)
Date: 2018-04-11T16:57:10-07:00	[thread overview]
Message-ID: <6518518c-5153-4afd-a2c5-d173ec0fe268@googlegroups.com> (raw)
In-Reply-To: <pam1nb$iv5$1@franka.jacob-sparre.dk>

On Thursday, April 12, 2018 at 7:20:28 AM UTC+9, Randy Brukardt wrote:
> "J-P. Rosen" <rosen@adalog.fr> wrote in message 
> news:palsmv$g18$1@gioia.aioe.org...
> > Le 11/04/2018 à 16:32, Dan'l Miller a écrit :
> >>> True if Item is a basic letter. A basic letter is a character that
> >>> is in one of the ranges 'A'..'Z' and 'a'..'z', or that is one of
> >>> the following: 'Æ', 'æ', 'Ğ', 'ğ', 'Ş', 'ş', or 'ß'.
> >> If this Ada-specific definition of this is-basic/base-Latin-letter
> >> property is the official normative list, then it seems rather
> >> arbitrary and capricious, not conforming to Unicode or to linguistic
> >> reality.
> >>
> >> In Unicode-speak's terminology/jargon, the definition of base
> >> character at https://definedterm.com/a/definition/160575 would admit
> >> quite a few more, [...]
> > The above Is_Basic is about Character, and is defined only when using
> > Latin-1. Unicode is a different standard.
> 
> Moreover, its definition is historical -- it was defined this way for Ada 
> 95, and whether or not that would be the correct definition had it been 
> defined in 2018 is irrelevant. Changing the definition would potentially 
> silently break programs that use it. There are a number of things in 
> Ada.Characters.Handling that aren't correct for Unicode purposes, one of 
> them is even called out by the third note in A.3.2.
> 
>                       Randy.

Thanks for your detailed description.

If Character.Handling.Is_Basic can not be changed because compatibility, still more, this *overloading* will create new problem for the future.

For example, on rewriting some applications from Character to Wide_Character, it may be imagined that two meanings of Is_Basic will confuse.
Or, they makes hard to use "use clause", or use as a generic formal subprogram.

Excuse me for repeating, should new function name be used for new definition?

  function Is_Base (Item : Wide_Character) return Boolean; -- according with Unicode
  function Is_Basic (Item : Wide_Character) return Boolean is (Is_Base (Item) and Is_Letter (Item)); -- for compatibility

  reply	other threads:[~2018-04-11 23:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-11  0:52 The extension of Is_Basic to unicode (about AI12-0260-1) ytomino
2018-04-11  3:38 ` J-P. Rosen
2018-04-11  3:52   ` ytomino
2018-04-11 14:32 ` Dan'l Miller
2018-04-11 20:54   ` J-P. Rosen
2018-04-11 22:20     ` Randy Brukardt
2018-04-11 23:57       ` ytomino [this message]
2018-04-12  5:14         ` J-P. Rosen
replies disabled

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