Re: 'Getters' and 'setters'. Hmm.

2000-12-17 Thread Jakob Hede Madsen
At 23:03 +0200 2000_12_17, Brennan Young wrote: >Jakob Hede Madsen <[EMAIL PROTECTED]> wrote OK, so you model hunting around the sense of smell, whereas I was thinking more in terms of the visual sense, which creates slightly different metaphors. If we are standing in a room, and "you" can see

broadcast mgr ( was 'Getters' and 'setters'. Hmm.)

2000-12-17 Thread Stephane Comeau
> > What would be a fair comparison would be to use > plistOfBehaviors]> > > Hmm... that's a new syntax for me. I assume plistOfBehaviors > is a list of > the instance references of all 44 sprites? Maybe I can learn > something here. How would that be faster than sendAllSprites? > > >I'll

Re: 'Getters' and 'setters'. Hmm.

2000-12-17 Thread Brennan Young
Jakob Hede Madsen <[EMAIL PROTECTED]> wrote > > > 3.Never ask an object for the information you need to do something; > > > rather, ask the object that has the information to > > > do the work for you. > > Bullocks. This guy must be living in a dreamworld. > If I have a baddie hunting the goo

Re: 'Getters' and 'setters'. Hmm.

2000-12-16 Thread Kerry Thompson
>But bringing #sendAllSprites in to the equation is just confusing. In a general discussion of OOP, yes. In my particular instance, I (cordially? ;-) disagree. I was giving an example of an exception where exposing a behavior's properties might be acceptable. On a larger scale, I completely a

Re: 'Getters' and 'setters'. Hmm.

2000-12-16 Thread Jakob Hede Madsen
At 0:01 +0200 2000_12_17, Brennan Young wrote: >This 'Getters' and 'setters' debate comes up pretty regularly. Yes, we need to end it once and for all, by making a decree, with proper guidelines to which any Lingo-coder must adhere or be banished from participating in public discussion on the e

Re: 'Getters' and 'setters'. Hmm.

2000-12-16 Thread Jakob Hede Madsen
At 15:55 -0800 2000_12_16, Kerry Thompson wrote: >For performance, I used globals for the floater's position and >direction, because it was faster for the other objects to access a >global than to do a sendAllSprites from the floater. On a technical not I'd just like to say that I think this c

Re: 'Getters' and 'setters'. Hmm.

2000-12-16 Thread Bjarne Nyquist
Just to add to the OOP discussion from a more pragmatic point of view In the projects I participate in there are often more than one programmer involved. Imagine different programmers getting and setting properties in behaviors and parent scripts they havenĀ“t even written themselves... We are

Re: 'Getters' and 'setters'. Hmm.

2000-12-16 Thread Kerry Thompson
>Most of all, it strikes me that if an object needs to see another >object's property, then something is wrong with the encapsulation. >Surely, objects provide *services*, not access to their guts. Brennan, to my mind, you've gone to the heart of the matter in that statement. I try to write my

'Getters' and 'setters'. Hmm.

2000-12-16 Thread Brennan Young
This 'Getters' and 'setters' debate comes up pretty regularly. I'm prepared to fly the OOP flag from time to time, but I've always felt a little uncomfortable with this idea of having a 'getter' and 'setter' for each 'public' property. I've never been able to come up with really good reasons w