Miscellaneous questions...

Blake blake at kingdomrpg.com
Fri Sep 9 02:57:39 UTC 2005


On Thu, 08 Sep 2005 19:23:53 -0700, Tom Phoenix <rootbeer at redcat.com>  
wrote:

> On 9/8/05, Blake <blake at kingdomrpg.com> wrote:
>> -> Still wondering about the Squeakland image; the download is less than
>> 1MB, so obviously it's not in there (right?).
>
> Still wondering about what you're asking; the sentence is only two
> lines long, so obviously there's no question in there (right?).
>
> :-)

I posted previously on downloading the Squeak plug-in and not getting an  
image with it. The point was made that it should be all-inclusive (which I  
believe is true) but the file itself is only about 900K! I'm trying to  
figure out if the link is wrong and needs to be corrected or what.

> Nope. But unless I have a reason to hide them, I have accessors for
> all instance variables, as a rule.

Not a strong believer in encapsulation?<s>

>> I notice that to test/debug it's often easiest to
>> have access to everything from the Workspace, but really don't want that
>> to be exposed to clients of the class.
>
> You have access to everything in an Inspector, too, so you don't need
> to make an accessor merely for development.

Yeah, but if I want to test code that's in a method from the Workspace, I  
don't think the Inspector's going to help there.

> It sounds as if you're worried about your #king being a problem if
> there's also a #king used in chess, say. But you can share #king just
> as you can share $R and 42. Global symbols are global constants, not
> global variables.

Yeah, I know that. It just...feels wrong.<s> I guess they have no semantic  
value at all, other than what's ascribed to them. Could make for some  
REALLY obscure bugs under some unlikely situations....

> Hope this helps!

It does, thanks. I welcome any other thoughts here, too.

Here's another one: Delegation. I tend to delegate like mad--years of  
Delphi programming and an aversion to the notion of identification  
("Whaddayamean an X is a Y? No it's not, it's an X!")--and I'm wondering  
if that's a bad idea for a deck of cards.

A deck of cards IS an ordered collection of cards. What I have is a deck  
of cards which HAS an ordered collection of cards, along with an ordered  
colleciton representing the as-yet undealt cards, plus an ordered  
collection of ordered collections for all the other piles (discard, hands,  
whatever is needed for the particular game). But I keep having to pass  
everything through to the master ordered collection.



More information about the Squeak-dev mailing list