|
-
Seemingly useless code
is there EVER any point to code like this:
Maybe to avoid dirtying the cache, or something like this?
-
NullPointerException
I don't see a point to that code at all. If x is already equal to y, you skip the assignment. If it's not equal to y, it will be afterwards. So why test? Just assign the value and move on.
Maybe somebody can make an argument that a boolean test exectues faster than an assignment, but this is as case where code readability would trump the microsecond that might be saved.
Open Source is free like a puppy is free.
It's only when you look at an ant through a magnifying glass on a sunny day that you realise how often they burst into flames.
Understanding Evolution
-
Hammerhead Shark
Useless. Probably does execute faster the times that x==y, but honestly how much difference could that possibly make?
Audio Setups:
E-MU 0404 ---toslink---> Panasonic SA-XR55s ---> Ascend Acoustics CBM170's with Dayton 12"
E-MU 0404 ---analog---> Little Dot II tube amp ---> Beyerdynamics DT880 or Sennheiser HD280 pros.
Technics SL-1200 MKII ---> TCC TC-750LC Phono Preamp ---> Panasonic SA-XR55s ---> Ascend Acoustics CBM170's with Dayton 12"
Proud Sharky Folding@Home member! (Rank 37 and counting...)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|