Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: REBOL-SIMPLE dialect

From: carl:cybercraft at: 21-Aug-2008 18:12

On Wednesday, 20-August-2008 at 10:36:46 Tim Johnson wrote,
>On Wednesday 20 August 2008, Henrik Mikael Kristensen wrote: >> if email? somewhere-blabla.com [print "Yes, that's an email"] > >from /Core 2.6.2.4.2 (linux) >>> if email? somewhere-blabla [print "Yes, that's an email"] >Yes, that's an email > >;; Bad call! Blows the validation scheme out of the water. :( >tim
Well spotted. Plus, given this was supposed to be an easy example for new users to figure out, isn't it reasonable to assume that the questionmark is part of REBOL's syntax and not just a character that's part of a word? Afterall, colons are added to both the beginning and ends of words in REBOL, so it stands to reason that a questionmark on the end of one suggests they can be added to all words. ie...
>> name1: "John"
== "John"
>> name2: "Janet"
== "Janet"
>> John? name1
== true
>> John? name2
== false
>> Janet? name2
== true Makes sense to me... ;-) Yes, facetious, but a reasonable assumption for a beginner to make, unlike assuming that a questionmark is part of a word. -- Carl Read.