[REBOL] Re: another gotcha
From: lmecir:mbox:vol:cz at: 3-Dec-2001 9:09
(...) From where I come, these two "declarations" of zone
looks like a redondancy.
Yes, right, it really looks strange, especially for beginners. Experienced
users may have some objections too, as I tried to describe in my Rep
(...) So if I understand correctly, unless "declared" in the main specs
my object set-words will be global. Is it right ? BTW, is there an explicit
way to do that, like the word /local in a function declaration ?
There is an explicit way how to do it. The most natural way currently is to
use the word in the SPEC block as you have found out like (spec: [word1:
word2: none etc.]) , although you can write even your own Make-object
function using a totally different specification method. As an example see
my Make-object function in %highfun.r (I didn't use a different way of local
words specification though) or the Sim-make-object function, that show how
you can write your own function creating an object.
(...)Finally I don't know what to think of your <<I would call this a
. It has affected me some way.
Wrong choice of a word, sorry. (I am not a native speaker). What I wanted to
tell was, that:
1) You have found a working solution
2) You have followed the documentation and produced a non-working solution
as you described (it doesn't look as your fault to me)
3) You repaired the sub 2) solution correctly using the [zone: none ...] in
the Spec block. Perfect.
4) You used a more complicated solution hiding its disadvantage that 'zone
would be global in this case. That is a trouble (a "disaster"), but it again
doesn't look as your fault to me, because you probably didn't have much of a
chance to find this in the documentation.
Sorry for offending words, I will try to improve my skills to be more
appropriate in the future.