From: "Robert I. Eachus" <rieachus@comcast.net>
Subject: Re: U : Unbounded_String := "bla bla bla"; (was: Is the Writing...)
Date: Fri, 10 Oct 2003 18:10:38 GMT
Date: 2003-10-10T18:10:38+00:00 [thread overview]
Message-ID: <3F86F5FE.4050104@comcast.net> (raw)
In-Reply-To: mailman.56.1065735568.25614.comp.lang.ada@ada-france.org
Alexandre E. Kopilovitch wrote:
> I'm not sure, though. Yes, Japanese is quite impressive in this regard,
> I have seen that in a raw reality (my daughter, being a linguist, had some
> correspondense by e-mail with several Japanese girls, and I was called for
> decoding and encoding those emails - well, it took some time and effort).
> But that is on the surface. When you go deep into real application problems,
> the situation may change: I know well that there are subtle and unpleasant
> problems with Russian encodings, and I know nothing about Japanese at that
> level.
Have you played the Minesweeper game that comes with Windows in expert
mode? Working with Japanese text is like that when you have to deal
with encodings. They have three alphabets, and almost all words can be
written using more than one. But the RIGHT one to use often depends on
context.
> Oh, it seems that I see (at last!) what you mean: you assume that conversions
> between encodings should be implicit! But this is far from desirable in real
> applications!
> I understand perfectly that there should not be two competing kinds of implicit
> conversions (one between encodings and another between String and Unbounded_String).
> So we have to choose between them.
>
> You assumed that implicit conversions between encodings are more natural and
> more desirable than implicit conversions between String and Unbounded_String.
Agreed, but you miss the problem. Right now you can implicitly convert
between string literals and ANY string type. You want to add implicit
conversions between String and Unbounded_String, and presumably between
Wide_String and Wide_Unbounded_String, and so on.
Now when you go to do explicit conversions between string types, the
presence of two potential implicit conversions makes some simple seeming
conversions hard or impossible to write unambiguously. If you want to
go and overload the (existing) explicit conversions on unary "+"
everything works just fine. The cases that would be ambiguous with two
implicit conversions around are disambiguated by the presence and
location of the "+" operators.
And as I said, I think adding implicit conversion of string literals to
and from Unbounded_String would work. But that isn't the case you want.
And of course, adding both that and implict conversions from String to
Unbounded_String would be a disaster.
The rules in ARM 4.6, Type Conversions and 8.6 The Context of Overload
Resolution are pretty complex just to make the language SEEM simple to
use. ;-)
--
Robert I. Eachus
"Quality is the Buddha. Quality is scientific reality. Quality is the
goal of Art. It remains to work these concepts into a practical,
down-to-earth context, and for this there is nothing more practical or
down-to-earth than what I have been talking about all along...the repair
of an old motorcycle." -- from Zen and the Art of Motorcycle
Maintenance by Robert Pirsig
next prev parent reply other threads:[~2003-10-10 18:10 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-02 18:02 U : Unbounded_String := "bla bla bla"; (was: Is the Writing...) amado.alves
2003-10-03 0:05 ` U : Unbounded String : " Alexander Kopilovitch
2003-10-03 20:46 ` Dmitry A. Kazakov
2003-10-03 9:00 ` U : Unbounded_String := " Preben Randhol
2003-10-03 11:17 ` Jeff C,
2003-10-04 2:49 ` Robert I. Eachus
2003-10-06 23:57 ` Alexandre E. Kopilovitch
2003-10-07 8:51 ` Dmitry A. Kazakov
2003-10-08 19:12 ` Alexandre E. Kopilovitch
2003-10-09 8:42 ` Dmitry A. Kazakov
2003-10-10 20:58 ` Alexander Kopilovitch
2003-10-13 8:35 ` Dmitry A. Kazakov
2003-10-13 21:43 ` Alexandre E. Kopilovitch
2003-10-14 8:09 ` Dmitry A. Kazakov
2003-10-16 9:39 ` Alexandre E. Kopilovitch
2003-10-18 10:57 ` Dmitry A. Kazakov
2003-10-08 23:18 ` Robert I. Eachus
2003-10-09 21:35 ` Alexandre E. Kopilovitch
2003-10-10 18:10 ` Robert I. Eachus [this message]
2003-10-11 19:43 ` Alexandre E. Kopilovitch
2003-10-12 5:03 ` Robert I. Eachus
2003-10-13 9:07 ` Dmitry A. Kazakov
2003-10-13 14:36 ` Alexandre E. Kopilovitch
2003-10-13 19:46 ` Robert I. Eachus
2003-10-14 1:35 ` Jeffrey Carter
2003-10-14 17:11 ` Alexandre E. Kopilovitch
2003-10-14 20:26 ` Mark A. Biggar
2003-10-14 20:58 ` Robert I. Eachus
2003-10-15 16:59 ` Alexandre E. Kopilovitch
2003-10-15 20:38 ` (see below)
2003-10-16 0:31 ` Alexandre E. Kopilovitch
2003-10-16 2:30 ` (see below)
2003-10-16 13:54 ` Alexandre E. Kopilovitch
2003-10-16 14:11 ` (see below)
2003-10-16 8:01 ` Dmitry A. Kazakov
2003-10-17 20:26 ` Randy Brukardt
2003-10-17 21:39 ` Alexandre E. Kopilovitch
2003-10-17 23:03 ` Robert I. Eachus
2003-10-23 21:11 ` Alexandre E. Kopilovitch
-- strict thread matches above, loose matches on Subject: below --
2003-10-03 12:00 amado.alves
2003-10-03 15:54 ` Mark A. Biggar
2003-10-03 20:41 ` Dmitry A. Kazakov
2003-10-03 16:12 amado.alves
2003-10-04 12:16 ` Preben Randhol
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox