[REBOL] Re: Object private member (was: objects: overhead, private data, naming
From: dockimbel:free at: 20-Sep-2001 15:20
CRS - Psy Sel/SPO, COUSSEMENT, Christophe, CPN
> Hi REBOLians:
> About object private members, could anybody explain this to me:
> o: context [
> _a: 5
> set '_b 10
> get-a: does [print-a]
> set 'print-a does [print _a]
> set 'get-b does [print _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.
No, you've defined '_b and 'get-b in the global context ! That's why o/_b and
o/get-b return an error.