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

[REBOL] Re: Bug! in assignment to date! values with stacked set-path values

From: rotenca:telvia:it at: 18-Nov-2002 12:19

Hi Ladislav
> I think (Praetera censeo), that functions should be fetched just once and > that > > a: func [x] [type? :x 1] > b: func [x] [type? :x 2] > a a: :b > > Should yield 1 (Carthaginem esse delendam).
I agree.
> Nevertheless, paths can be evaluated like above and it makes perfect sense > to me:
Do you means that set-path should be fetched only one time? I think that the problem with path could arise from the fact that set-path does not exists as true datatype!, it is only the last item in the path that make rebol thinks it is a set-path. To truely understand the path, it should evaluate the path itself to find its real meaning. The result is a strange behaviour: a set-path which works like a path x: func [/b][3] type? first [x/b:];== set-path! x/b: ;==3 in the last istruction no set action has been done, the last set-path has been used like a normal path. This happens, i think, because type? looks only at the form of path and it see a set-word, while evaluation sees a function call and a refinement!. Another strange thing: :x ;== function? :x/b ;== 3
> the same operation used for dates yields: > > a: now > a/day: 1 ; == 1 > > , which doesn't look unified.
this is for me the mutation hack at work. --- Ciao Romano