On Sat, 12 Apr 2008 11:50:56 -0700 (PDT), Eric Hughes wrote:
> I believe many of the issues involving strings could be addressed by
> introducing a predefined type universal_string.
I don't see it this way. You have mentioned universal_integer, which is
already here. So a comparable case would be Integer vs. BigNum. The latter
(arbitrary-precision arithmetic) plays same role for integers as
Unbounded_String does for strings. Now, if ARM had BigNum defined, we
would
experience exactly same problems with both, as we have with Strings and
Unbounded_String.
> Now, my real hope is that universal_string wouldn't need to be
> predefined at all, but specified algebraically or logically within a
> future version of Ada.
I can only agree with that.
But note, that in order to do so, you will need slices, indices and sets
of
indices (ranges is an example of) defined algebraically as well. Presently
Ada lacks them.
The bottom line, instead of patching it here and there, the language type
system should be redesigned. Hacks need to be replaced by sound
concepts.[*] Unfortunately Ada community has little interest in that.
----------
* By this I don't mean backward incompatibility. Actually it is the hacks,
which are responsible for most of incompatibilities, as they tend to
introduce strange syntax, new reserved words and confusing semantics.
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


|