[REBOL] Object private member (was: objects: overhead, private data, nami ng con
From: coussement::c::js::mil::be at: 20-Sep-2001 14:12
About object private members, could anybody explain this to me:
o: context [
set '_b 10
get-a: does [print-a]
set 'print-a does [print _a]
set 'get-b does [print _b]
** Script Error: Invalid path value: get-b
** Near: o/get-b
>> source o
make object! [
get-a: func [print-a]
** Script Error: Invalid path value: _b
** Near: o/_b
So... it looks like within an object, the use of 'set invoque a
privatization of the word, which is not any more visible from the outside.
Great: I can use this property for making private members, but this way of
doing is still strange to me.
Any clue why a 'set-word! has two different ways of handling things, within
this context ?