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

[REBOL] Re: I hate computers!

From: edanaii:cox at: 5-Jan-2003 9:26

Joel Neely wrote:
>OTOH, staying with the REDUCE allows one to use VALID-TYPE? with >exemplars as well, since the expressions would evaluate to types >in something like > > valid-type? foo [type? something type? somethingelse] > >Good thing the cat has nine lives, as he can be skinned so many >different ways! >
But would you want to do this? The purpose of the function was to allow the use of multiple datatypes for a parameter and still keep it optional. As was pointed out to me earlier, the use of Any-Type! seems to make a parameter optional. Were I to define a parameter as such: Parameter [ String! Money! ], if I omit the parameter when called, it blows up. But with any-type!, it doesn't. So this was a means to have multiple parameters and have it optional. This would allow me to do some overloading, i.e. fall Foo with a String performs a different action than Foo with Money or Foo without a parameter. -- Sincerely, | Don't part with your illusions. When they are gone Ed Dana | you may still exist, but you have ceased to live. Software Developer | -- Mark Twain 1Ghz Athlon Amiga |