Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Re: Change the parent of an instance

by muba (Priest)
on May 11, 2004 at 18:38 UTC ( #352536=note: print w/replies, xml ) Need Help??


in reply to Re: Change the parent of an instance
in thread Change the parent of an instance

Might be a good idea, altough in this case many of the methods will be in an if-else manner, just because the two things share a lot although they hardly share anything.

I know it might look like I'm rejecting all advises, I'm aware of that, but the 'multimorphing' idea as it seems to be called is not very usable I think.
  • Comment on Re: Re: Change the parent of an instance

Replies are listed 'Best First'.
Re: Re: Re: Change the parent of an instance
by perrin (Chancellor) on May 11, 2004 at 18:44 UTC
    What I'm suggesting is that you are thinking about it at the wrong level. What's important to your program might not be whether or not the object is a foe but rather whether or not it is carryable. Each kind of object may have unique rules about when it is carryable. In general, the idea is to push as much of the decision-making about how an object will behave in a certain situation into the object itself (by asking it with methods like this) rather than have some other code that decides what the object can do based on what type it is.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://352536]
help
Chatterbox?
[1nickt]: stevieb I don;t doubt that there's a difference. BestBuy has "consumer" models only on display.
[ambrus]: 1nickt: for some reason, these days they call every computer "gaming", even ones that gamers wouldn't buy. I've bought a keyboard that was labelled "gamer", despite that it has hard springs and seems to be way better for typing than for gaming;
[1nickt]: I though the gamers like that because they bash the keys so hard.
[ambrus]: and I've seen motherboards with no fast expansion ports for a video card but built-in hardware RAID advertized as "gaming".
LanX has a shaming laptop
[ambrus]: 1nickt: my impression is that the gamers like the softer springs, because fast reaction time is more important to them then feedback from keypresses to recognize typos.
[1nickt]: Ah, I see. I did read some gamer mag reviews, and yes, they lamented the fact that laptops with no discrete video card are sold as "gaming" hardware.
[1nickt]: But, they do have red keyboard backlighting! And gargoyles on the front, or words like "Maxxx" here and there. They know their demographic!
[1nickt]: True gamers don;t buy Dells, HPs, or Lenovos, I think ;-)
[ambrus]: The keyboard I bought doesn't have backlighting. I specifically had to select for that, because so many keyboards these days have lights. Why would I want lights in the keyboard? I want lights in the room, such as on the ceiling, not in the keyboard.

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (11)
As of 2017-03-27 13:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (320 votes). Check out past polls.