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

[REBOL] Re: Refinements

From: jan:skibinski:sympatico:ca at: 13-Nov-2002 18:43

> That leads me to wonder about giving each refinement an explicit > logical value, which can be passed on easily (with a bit of typing > effort, to be sure) ...
I have recently come to a similar conclusion, but for a bit different reason: one cannot do direct logical operations on refinements. For example, in the type checker I work on I have two refinements: /debug and /step: the former is for me as a developer, the later for a user to show step-by-step reductions. But there are cases where I would like to print the same mesage for either refinement. I ended up defining the corresponding local logical variables instead, so I can or- them together if needed. Moreover, I removed the refinements from a worker function, and just call it with explicit arguments 'debug and 'step. The worker is not to be used directly (unless for a testing), so it does not make much sense to maintain the refinements at that very low level. Jan