>>>So, if I read that properly. You are saying that one HAS to be DRUNK AND TIRED to drive the car??? No wonder there are so many accidents on the road... ;)
>>>
>>>Chad
>>
>>Wow, you're right! And all the others haven't noticed that before! We must be really lousy reviewers. :)
>
>Right - and this actually proves Jim's assertion that this can be hard to read, and my assertion that the names of methods have to be meaningful. The .drunk() and .tired(), .tank.empty() methods have completely wrong names. In a context of the example, they have to have positive names:
>
>
lCanDrive=.f.
>do case
> case not this.HaveCar()
> case not this.HaveLicense()
> case not this.sober()
> case not this.rested()
> case not this.car.GotGas()
> ...
> otherwise
> lCanDrive=.t.
>endcase
Disagree.
do case
case not this.HaveCar()
case not this.HaveLicense()
case this.drunk()
case this.tired()
case this.car.tank.empty()
otherwise
lCanDrive=.t.
endcase
Groet,
Peter de Valença
Constructive frustration is the breeding ground of genius.
If there’s no willingness to moderate for the sake of good debate, then I have no willingness to debate at all.
Let's develop superb standards that will end the holy wars.
"There are three types of people: Alphas and Betas", said the beta decisively.
If you find this message rude or offensive or stupid, please take a step away from the keyboard and try to think calmly about an eventual a possible alternative explanation of my message.