Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualAllEightUp

Posted 31 March 2013 - 04:47 PM

Hmm.....  It is an idea but pretty non-standard from the code bases I've worked with.  Not saying it is wrong, just thinking as I type here.  In the one case I definitely agree that overloading operators with non-standard meanings is generally a bad idea.  Unfortunately I've gotten so damned used to the caret (^) meaning cross product it has become yet another thing I should re-evaluate. smile.png  The idea of normalize(d) has me wondering though.  Is the semantic change enough to prevent errors and are the signatures hardened against the "oops" cases?

 

I think the solution I've presented has all the same results but with only two functions?  I'm trying to think of other variations and I might be too bogged down since I've given this a fair amount of thought today. smile.png

 

* edit

A bit more thought after reading the other thread.  I still think that "Normalize" is a good name for both variations.  The reasons for mutable and const are all valid and how to deal with extra mutated results.  I believe my proposal answers all the suggested items though and the only real thing is if the helper should be called "Normalized" instead of just "Normalize"?  It is nice to know I'm not being too pedantic in this, seems other folks care also. smile.png


#2AllEightUp

Posted 31 March 2013 - 04:44 PM

Hmm.....  It is an idea but pretty non-standard from the code bases I've worked with.  Not saying it is wrong, just thinking as I type here.  In the one case I definitely agree that overloading operators with non-standard meanings is generally a bad idea.  Unfortunately I've gotten so damned used to the caret (^) meaning cross product it has become yet another thing I should re-evaluate. smile.png  The idea of normalize(d) has me wondering though.  Is the semantic change enough to prevent errors and are the signatures hardened against the "oops" cases?

 

I think the solution I've presented has all the same results but with only two functions?  I'm trying to think of other variations and I might be too bogged down since I've given this a fair amount of thought today. smile.png

 

* edit

A bit more thought after reading the other thread.  I still think that "Normalize" is a good name for both variations.  The reasons for mutable and const are all valid and how to deal with extra mutated results.  I believe my proposal answers all the suggested items though and the only real thing is if the helper should be called "Normalized" instead of just "Normalize"?  It is nice to know I'm not being too pedantic in this that most folks ignore it. :)


#1AllEightUp

Posted 31 March 2013 - 04:29 PM

Hmm.....  It is an idea but pretty non-standard from the code bases I've worked with.  Not saying it is wrong, just thinking as I type here.  In the one case I definitely agree that overloading operators with non-standard meanings is generally a bad idea.  Unfortunately I've gotten so damned used to the caret (^) meaning cross product it has become yet another thing I should re-evaluate. :)  The idea of normalize(d) has me wondering though.  Is the semantic change enough to prevent errors and are the signatures hardened against the "oops" cases?

 

I think the solution I've presented has all the same results but with only two functions?  I'm trying to think of other variations and I might be too bogged down since I've given this a fair amount of thought today. :)


PARTNERS