comp.lang.ada
 help / color / mirror / Atom feed
From: Keith Thompson <kst@cts.com>
Subject: Re: obsolete ascii? (for language lawyers)
Date: 1999/07/02
Date: 1999-07-03T03:45:19+00:00	[thread overview]
Message-ID: <yecemiq75ww.fsf@king.cts.com> (raw)
In-Reply-To: 7ljde7$o4j$1@nnrp1.deja.com

Robert Dewar <robert_dewar@my-deja.com> writes:
> Don't worry, there is no possibility whatsoever of anyone
> doing anything so idiotic as to create major incompatibilities
> by removing package Ascii. Even if the ISO committee did make
> a silly decision like this, vendors would put it back.

Agreed.

> The whole business of obsolescent features is in my view
> completely silly. The features in annex J are so small and
> marginal, that to remove them would not begin to be worth
> the headaches caused by legacy code.
> 
> You should feel free to use any of these features without
> the slightest hesitation in my view.

Here, I have to disagree.  Part of the point of declaring a feature to
be obsolescent is to warn that it might be removed in a future version
of the standard.  (I agree that this isn't likely to happen.)  The
more important reason, however, is to let people know that there's a
newer, better way to do the same thing.  These are features that are
in the language *only* to support legacy code; if the language were
being designed from scratch today, they wouldn't be there.

I wouldn't use '%' as a string literal delimiter, or write a context
clause for Text_IO (rather than Ada.Text_IO), or a handler for
Numeric_Error, in new code -- not because I expect any of those
features to vanish, but because it's bad style.

(I wonder how many Ada programmers even know that this:

    with Text_IO;
    procedure Obsolesce is
        X : Integer := 16:FF:;
    begin
       Text_IO.Put_Line(%X = % & Integer'Image(X));
    end Obsolesce;

is valid.)

On the other hand, if you have legacy code that uses these features,
it's not worth going back and changing it unless you're doing a major
rewrite anyway.

-- 
Keith Thompson (The_Other_Keith) kst@cts.com  <http://www.ghoti.net/~kst>
San Diego Supercomputer Center           <*>  <http://www.sdsc.edu/~kst>
One of the great tragedies of ancient history is that Helen of Troy
lived before the invention of the champagne bottle.




  reply	other threads:[~1999-07-02  0:00 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-06-29  0:00 obsolete ascii? (for language lawyers) Peter Hermann
1999-06-29  0:00 ` David C. Hoos, Sr.
1999-06-29  0:00   ` Ted Dennison
1999-06-29  0:00 ` John Herro
1999-07-02  0:00   ` Peter Hermann
1999-07-02  0:00 ` Peter Hermann
1999-07-02  0:00   ` Ted Dennison
1999-07-02  0:00     ` Ted Dennison
1999-07-02  0:00   ` Robert A Duff
1999-07-02  0:00   ` Robert Dewar
1999-07-02  0:00     ` Keith Thompson [this message]
1999-07-03  0:00       ` Robert Dewar
1999-07-03  0:00         ` Keith Thompson
1999-07-08  0:00           ` John Duncan
1999-07-08  0:00           ` Tucker Taft
replies disabled

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