Method Parameter precedence

Arokh

Centurion
Joined
Apr 11, 2006
Messages
124
I'm wondering if it is bad practice,
to rely on the parameter value calculation precedence.
Man, that sounded complicated. :D

An example:

Visual Basic:
ServerTCP.SendData(DataIO.GetData, DataIO.ReadToEnd)

DataIO.GetData reads some bytes from its stream and then
DataIO.ReadToEnd reads the rest, so if the precedence were different,
all would goto hell. :rolleyes:

So is relying on something like this a bad idea?
 
The likelyhood of the order being changed is going to be virtually nil - this could break far too many things.

Personally I would use readability as a guideline - is it obvious what the line is doing? If so leave it alone, otherwise rewrite it to be more obvious.
 
Well I guessed that might be the case.
I just thought there might be a "special" reason to not do this.

Thanks for the info PlausiblyDamp :)
 
Back
Top