[racket-dev] Oversight in type for path-string?

From: Eli Barzilay (eli at barzilay.org)
Date: Sat Mar 24 12:36:31 EDT 2012

IMO defining `Path-String' in a way that doesn't correspond to
`path-string?' is not a good idea.  I'd prefer it if the name was
changed or if the type changes to accurately reflect the predicate.

(The latter might be more problematic since it probably implies doing
more checking than done now, and also there's the question of getting
into path-strings for other platforms...)

Yesterday, Sam Tobin-Hochstadt wrote:
> That's true, which is why it has to have a more complex filter than
> you'd expect.  But if a value isn't `path-string?', then it is
> definitely not a `Path', and if it *is* `path-string?' then it's
> either a `String' or a `Path'.  So we can express an approximation
> of it's behavior in the type.
> On Fri, Mar 23, 2012 at 12:09 PM, Eric Dobson <eric.n.dobson at gmail.com> wrote:
> > Actually I don't think this is an over sight. The null string is a
> > String.  And Path-String is Path U String, but (path-string?
> > (string #\null)) => #f.

          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!

Posted on the dev mailing list.