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

[REBOL] Zebol (was ordinal cardinal)..

From: jeff:rebol at: 8-Jul-2001 9:19

Howdy, Joel:
> A routine that has some reason to twiddle a global switch > accepts responsibility for saving the state of the global, > doing its own thing, then restoring the state before > exiting. > > It is, of course, much simpler simply to do without > features that affect the global state. Just imagine the > chaos that could ensue if, for example, we allowed a > function to change the current directory, close a file, or > modify a global variable... The mind boggles! ;-)
My mind boggles at your comparisons. (-; a-z-fun: does [ system/options/index: 0 -- Some Code -- system/options/index: 1 ] What can go in Some Code? Well anything as long as you don't call ANY mezzanines or native functions that may end up using any series actions or functions that expect a 1 base universe. Otherwise results will be UNPREDICTABLE. It's subtle/complex, and very prone to creating hard to trace bugs that may not show up until long after the fact. It's essentially "critical section" code, and would make programming REBOL Z-based like programming a device driver, not very appropriately equated in consequences to: change the current directory, close a file, or modify a global variable... But, as you say, you're not arguing for a global Z setting -- so that's neither here nor there.. (-:
>> On second thought, replicating all the series actions is >> sounding much more preferable... > > We can certainly agree on that.
The more I think about the z question, the more I am annoyed at the problem because I can't see (or have yet to have seen) a truly graceful, simple, REBOL-like way of adding it into the language. Expedience makes for crummy design. I want to argue against something that I think may be a mistake for REBOL, or may be an ugly addition like a big condo development that wrecks the view-- sure people need houses, but do we have to just throw up any old box with windows on the nicest hills in the valley? No offence. -jeff