[REBOL] Re: Dumb newbie Rebol question
From: parki:whatevernot at: 4-Sep-2003 23:01
Wow - help on this list is great.
Having fun putting together the X.10 control stuff - will soon be able
make available sample Rebol code to control X.10 lights - reading up on
dialects right now. Cooooool.
But have a couple 00 questions:
1. Data encapsulation - is there any convenient way to make data
readonly in an object? I need to define some constants, and I want to
put them in an object so as to not clutter up the namespace. I thought
this might work, but it does not:
x: make object! [
2. Any way to enforce some sort of Singleton idiom? I suspect that
asking this (and perhaps the above) are caused by not enough
indoctrination to the Rebol way of doing things, but wondering... I am
going to put the serial connection code into an object (again, keep
namespaces clean) and in Java, I'd make this a Singleton, as I only
want one serial connection open. Not sure how this should be tackled in
Hot dang - this is a fun language!