[REBOL] Re: Bug! Rebol's parsing of urls is incorrect.
From: petr:krenzelok:trz:cz at: 11-Feb-2001 12:37
----- Original Message -----
From: Andrew Martin <[Al--Bri--xtra--co--nz]>
Sent: Sunday, February 11, 2001 9:03 AM
Subject: [REBOL] Re: Bug! Rebol's parsing of urls is incorrect.
> Ryan wrote:
> > Maybe 'type? should be as loose as possible, allowing for the greatest
> flexibility on its use? A seperate pickier and slower data validation
> function could be used to say that something is not ready for the outside
> world. After all, 'type?'s docs just say "Returns a value's datatype," no
> mention of validity.
> What we really need is a validating parser/loader/scanner, one for each
> scheme. I've been skimming through the schemes and noticed there's some
> repetition in Rebol's open functions, which could be abstracted out. Also,
> if a validating parser rule was incorporated into each scheme to check for
> wellformedness, that would be good. As it stands now, I can't use Rebol's
> 'load/next function to extract a URL from plain text with punctuation
> it. For example extracting the URL from the following: "Rebol's HQ"
> http://www.rebol.com! requires me to write my own URL parser.
Sorry if off-topic, but I came too late to the discussion. I remember the
case when I wanted to check for the value and if it is an email. Example:
->> eml: to-email "just.a.string"
->> type? eml
->> email? eml
Then Elan (IIRC) explained me that even if I have some value marked as
certain datatype, it doesn't mean it has to be actullly valid email adress
for e.g. But even RT is/was using email? some-value to show outside world
how it is easy to check for email values. But as you can see, it has not to
be always true.Maybe the 'load is the way?
->> email? load "just.a.string"
->> email? load "[just--a--string]"