[squeak-dev] Invariants give guidance here (was Re: A question about #beginsWith: and #endsWith:)
eliot.miranda at gmail.com
Mon Apr 25 19:20:43 UTC 2022
On Fri, Apr 22, 2022 at 11:47 AM David T. Lewis <lewis at mail.msen.com> wrote:
> On Fri, Apr 22, 2022 at 09:40:15AM +0200, Tony Garnock-Jones wrote:
> > On 4/22/22 03:57, David T. Lewis wrote:
> > >I don't think it is a bug. I can't think of a case where it makes
> > >sense to say that a string of characters "begins with" or "ends with"
> > >a string that contains nothing.
> > I think we (well, certainly *I*) want invariants like the following to
> > for all X, Y, Z,
> > `Z = (X, Y)` implies `(Z beginsWith: X) = true`.
> > Without `(X beginsWith: '') = true`, they don't. I think that's a bug.
> > (It's a classic (even classical) one, too. This kind of problem arose
> > with Aristotle's syllogistics and didn't really get properly fixed until
> > Frege straightened it all out in the 19th century (!). Aristotle has,
> > contra modern logic, universally-quantified statements false where the
> > relevant universe is empty; this causes all sorts of havoc, forcing
> > nasty exceptions everywhere. Anyone interested in going down this
> > rabbithole will likely find  diverting!)
> > Tony
> >  https://plato.stanford.edu/entries/generalized-quantifiers/
> This is what I love about Squeak, I'm always learning something :-)
> In any case, if Richard O'Keefe, Tony Garnock-Jones, and Aristotle
> all agree that it's a bug, then I guess it's a bug. We should write
> some tests and fix it.
See Collections-eem.1007 in inbox for a proposed fix.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Squeak-dev