Newsgroups: comp.lang.c++,comp.lang.smalltalk,comp.lang.eiffel,comp.lang.ada,comp.object,comp.software-eng
Path: cantaloupe.srv.cs.cmu.edu!rochester!udel-eecis!gatech!csulb.edu!hammer.uoregon.edu!hunter.premier.net!feed1.news.erols.com!news.ecn.uoknor.edu!munnari.OZ.AU!news.mel.connect.com.au!news.syd.connect.com.au!syd.csa.com.au!news
From: donh@syd.csa.com.au (Don Harrison)
Subject: Re: OO, C++, and something much better!
X-Nntp-Posting-Host: dev50
Message-ID: <E44u82.6uB@syd.csa.com.au>
Sender: news@syd.csa.com.au
Reply-To: donh@syd.csa.com.au
Organization: CSC Australia, Sydney
References: <JSA.97Jan16141937@alexandria>
Date: Fri, 17 Jan 1997 03:12:01 GMT
Lines: 28
Xref: glinda.oz.cs.cmu.edu comp.lang.c++:240933 comp.lang.smalltalk:49273 comp.lang.eiffel:17399 comp.lang.ada:56075 comp.object:59926 comp.software-eng:52618

Jon S Anthony writes:

:Where's the polymorphism of
:any form here?  Subtypes are ways of defining constraints (simple
:"assertions") on the possible values of the type.  Sub_Integer is not
:a new type and is not a type derivation.  So, you only have one type
:here (Re: RM: 3.2(8))
:
:The CE, is simply stating that you have violated the constraint
:(assertion).  No polymorphism broken or otherwise involved.

Yes, if you define subtypes as such, then I concede it may be more reasonable 
to regard this as simply an assertion violation and declare the type system
free of holes. It's a question of definition.

:Also, while it is certainly not necessary, this case is so simple (for
:DFA) I am a little surprised that GNAT did not give a warning about
:this at compile time.

I compiled it with the Sun Ada 1.1(f) Ada83 compiler. I agree it ought to
give a warning.


Don.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Don Harrison             donh@syd.csa.com.au


