Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I'm wondering if it is bad practice,

to rely on the parameter value calculation precedence.

Man, that sounded complicated. :D

 

An example:

 

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?

  • Administrators
Posted

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.

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Posted

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 :)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...