comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: discontinuous subtype without aspect
Date: Tue, 30 Jan 2018 16:09:15 -0600
Date: 2018-01-30T16:09:15-06:00	[thread overview]
Message-ID: <p4qqec$m6o$1@franka.jacob-sparre.dk> (raw)
In-Reply-To: 6972f8eb-6130-4c47-b27a-f8dd0afeb171@googlegroups.com

"Mehdi Saada" <00120260a@gmail.com> wrote in message 
news:6972f8eb-6130-4c47-b27a-f8dd0afeb171@googlegroups.com...
>> ...because people didn't want set constraints. I still fail to understand
>>why, as you point out, a static predicate is not quite a replacement.
>It is a replacement, but I thought it was a shame there existed now, two 
>syntaxic
> constructs to express the same things.

They're not semantically the same thing, as the set of values for a type 
(determined by a constraint) is always contiguous. A predicate then excludes 
some values from the set for various purposes, but the formal value set of 
the type is always contiguous. I agree, though, that the difference is 
mainly semantic, but it does show in the values of 'First and 'Last for the 
subtype, and a few other places.

...
>Is that what you mean by set constraints ?

Something like that, I don't remember the proposed syntax. The main 
difference is that a set constraint did change the set of values - so 'First 
and 'Last would change. There's not much difference, so I suppose that some 
people thought that the predicate version was simpler. I never agreed, so 
I'm the wrong person to talk to about this topic!

                        Randy.


      parent reply	other threads:[~2018-01-30 22:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-28 14:45 discontinuous subtype without aspect Mehdi Saada
2018-01-29 23:24 ` Randy Brukardt
2018-01-30 17:31 ` Mehdi Saada
2018-01-30 18:15   ` Dmitry A. Kazakov
2018-01-30 22:09   ` Randy Brukardt [this message]
replies disabled

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