comp.lang.ada
 help / color / mirror / Atom feed
From: Charles Hixson <charleshixsn@earthlink.net>
Subject: Re: disjoint ranges ?
Date: 2000/10/23
Date: 2000-10-23T00:00:00+00:00	[thread overview]
Message-ID: <39F48116.35EE68C9@earthlink.net> (raw)
In-Reply-To: 39E7BB80.1AB10FE2@ix.netcom.com

Lao Xiao Hai wrote:

> ...
> There are some in the world of object technology who believe that enumerated
> types are a bad idea because they are an artifact of an old-fashioned style of
> programming.   This same criticism could be leveled at the whole issue of
> range constraints.   While the notion of a range constraints was a good one
> when first introduced,  it could be argued that the problem addressed by
> a range constraint better can  be solved with assertions.  An assertion would
> enable easy modeling of non-contiguous ranges.   Of course, this also makes
> the compiler a bit more complicated and introduces other problems.  The
> question is whether the new problems are worse than the old one being
> solved.
> ...

Many criticisms of features are based upon the way that C++ implements the
feature.  This is not exactly fair, but is perhaps inevitable as C++ is the most
commonly known language.  Since Java is the second, and there is a large overlap
between the user base, perhaps if C++ does a poor job of implementing a feature,
and Java leaves it out, we can expect the feature itself to be criticized.

The assumption that there is some basic "right" way to do things is probably
wrong.  It seems to me that there are a range of correct ways, some more suited to
some problems, and others to others.  It also seems that there are a range of ways
to think, and that some are more suited to some programming constructs, and others
to others.  It's not really clear that one would gain anything by shoehorning a
construct where it didn't fit naturally.  Ada is designed, complex, intricate,
reliable, "small", and, especially, Formal.  This is seen in the Ada implementation
of Objects as Tagged records.  It makes perfect sense, after you think about it
long enough.  A tagged type makes explicit things which most implementations of
Objects leave implicit.  If you feel that these things should be implicit, then you
are more likely to feel that the members of an enumerated type should be hidden
behind the impermeable walls of a class.  But there are lots of problems with
that.  The lack of enumerated types is one of Java's big weaknesses, even if I
don't like the way that C handles them.

-- (c) Charles Hixson
--  Addition of advertisements or hyperlinks to products specifically prohibited






  reply	other threads:[~2000-10-23  0:00 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-10-12  0:00 disjoint ranges ? Philippe Torres
2000-10-12  0:00 ` Pat Rogers
2000-10-12  0:00   ` Ehud Lamm
2000-10-12  0:00     ` Pat Rogers
2000-10-13  0:00       ` Ehud Lamm
2000-10-13  0:34       ` Jeff Carter
2000-10-13  0:00         ` Philippe Torres
2000-10-14  3:12           ` Robert Dewar
2000-10-16  0:00             ` Robert A Duff
2000-10-16  0:00               ` Lao Xiao Hai
2000-10-17  0:00                 ` Robert A Duff
2000-10-17  0:00                   ` Lao Xiao Hai
2000-10-18  0:00                   ` dmitry6243
2000-10-18  0:00                 ` Robert Dewar
2000-10-18  0:00                   ` Robert A Duff
2000-10-19  3:08                     ` Overloading "in" (was: disjoint ranges ?) Jeff Carter
2000-10-19  0:00                       ` Ehud Lamm
2000-10-21  0:00                       ` Robert Dewar
2000-10-21  0:00                         ` Jeff Carter
2000-10-16  0:00               ` disjoint ranges ? Robert Dewar
2000-10-13  0:00         ` Marin David Condic
2000-10-14  3:14           ` Robert Dewar
2000-10-13  0:00     ` Philippe Torres
2000-10-13  0:00 ` wayne lydecker
2000-10-13  0:00   ` Lao Xiao Hai
2000-10-23  0:00     ` Charles Hixson [this message]
2000-10-24  0:00       ` dmitry6243
2000-10-13  0:00   ` wayne lydecker
2000-10-13  0:00 ` Lao Xiao Hai
2000-10-14  3:17   ` Robert Dewar
2000-10-16  0:00   ` Robert A Duff
2000-10-24  0:00 ` Andrew Cooke
replies disabled

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