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

[REBOL] Re: Set-words and refinements

From: rebol::svendx::dk at: 15-Nov-2000 1:09

Hello Brett On 14-Nov-00, you wrote: -- snip --
> So the interesting bit to me is the rollover-handling functionality of dates > during set-word. Let's say I wanted to create an object similar in > functionality to the date datatype. At the moment I think that I would have > to define a function set-month > that would do the rollover handling. So my object would be set like > > mydate/set-month mydate/month + 1 > > Wouldn't it be nice if I could create my object and when I set a word in it > using the normal set-word syntax it calls a function to handle the change > instead of creating calling the setter function explicity > > Then mydate could utilise the same set-word syntax as the date datatype. > > Waddya reckon?
I've been wanting to try something like PYRO (PYthon Remote Objects) in REBOL, but the syntax keeps getting ugly, like: my-remote-object/set-attr 'attr-name "value" instead of: my-remote-object/attr-name: "value" For more information about PYRO: http://www.xs4all.nl/~irmen/python.html In general, I belive REBOL would benefit by looking a bit at how Python allows objects to act like any(?) other datatype; lists, files, numbers, etc.
> Brett. >
Best regards Thomas Jensen