Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle For Fun

Re: Oracle For Fun

From: Jeff <jeff_at_work.com>
Date: Tue, 03 Feb 2004 17:53:30 GMT
Message-ID: <bvon5v$599$1@cronkite.cc.uga.edu>


In article <psQTb.214106$xy6.1104207_at_attbi_s02>, "VC" <boston103_at_hotmail.com> wrote:

>1. The trick is replacing one if-statement with another and then
>critcsizing the replacement.

The if-statement was in code to test the function... and I substituted alternative (but functionally equivalent) test code to demonstrate how the results would differ if you were operating under the premise that a NULL passed in returns FALSE from the function. There was no "trick."

>2. The 'someone' has to learn the function/class/etc. interface before
>trying to use it, has not he/she ?

Of course... as long as they aren't required to know how the object does what it does and it's behavior is 100% predictable. Translate2 is fine as long as you are operating under the spec that functions return NULL if passed NULL. If you are operating under a different spec, then translate2's behavior won't be predictable, and the user will learn the hard way that translate2 violates spec.

At this point, if you understand and accept encapsulation, I'm not sure why you're continuing to argue a point. I've already said that translate2 is fine given the lack of a clear specification for the exercise. Received on Tue Feb 03 2004 - 11:53:30 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US