|
Authored by: Anonymous on Thursday, May 10 2012 @ 10:07 AM EDT |
Would it be fair use to paste the code here, so that people
can see exactly what is at issue? I think most developers
will be astounded that Oracle could go to trial with this.
If I was representing Oracle, I'd be embarrassed.[ Reply to This | Parent | # ]
|
|
Authored by: Anonymous on Thursday, May 10 2012 @ 10:19 AM EDT |
I would ask if it was considered self-documenting-code, as if it is, then the
code is also the most consise decription of the function there is.
But yeah, expressing that in plain language is a pain, that's why programming
languages were developed![ Reply to This | Parent | # ]
|
|
Authored by: pem on Thursday, May 10 2012 @ 10:41 AM EDT |
Here's a Python version. Could (should) be updated to give actual values of the
parameters on error, but that would just distract from the simplicity of the
operation for this example:
def rangeCheck(arrayLen,
fromIndex, toIndex):
if 0 <= fromIndex <= toIndex
<= arrayLen:
pass
else:
raise IndexError
[ Reply to This | Parent | # ]
|
|
|
|
|