d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Java Compiler Bug?
Prev12
Add Reply New Topic New Poll
Member
Posts: 13,425
Joined: Sep 29 2007
Gold: 0.00
Warn: 20%
Jun 19 2016 06:39pm
Quote (Ideophobe @ Jun 19 2016 07:16pm)
dude said he was told he could use it as a unary operator
besides being redundant i think it's just an ugly thing to do writing equality comparisons for booleans
they should be named things like isAvailable, isContainedInGpsList, isWhatever so when you look at if statements it's just obvious you're checking whether something is true or not


From the code snippet it appeared that they were looking for the not equals operator. Seeing how ferf states he knew the use of the operator and his friend seemingly did not, I simply corrected a typo to correct functionality.

You are correct though in that in some cases you do not need to compare directly to the definitions. This varies and is not a hard set rule. For example if by some chance you have a hash where a single key can be multiple values, perhaps maybe a result key, that gets passed around functions. One function my set result to a string or integer, another may set it to true. Although pathetic design you would indeed want to test directly for true or false since the type is unknown.
Member
Posts: 14,631
Joined: Sep 14 2006
Gold: 575.56
Jun 19 2016 07:42pm
Quote (ferf @ Jun 18 2016 01:17pm)
Yeah i knew it was unary which was why i didn't think it'd work, but my friend said otherwise haha

^ this
Member
Posts: 13,425
Joined: Sep 29 2007
Gold: 0.00
Warn: 20%
Jun 19 2016 09:47pm
Quote (Ideophobe @ Jun 19 2016 09:42pm)
^ this


And what did you not understand about him knowing it would not work and his friend needing a correction. Do you think ferf would of mentioned it being a unary operator he was looking for before catre made the post? He never even mentioned if he required the not operator as the only single operand operator or not.

Just get your head out of your ass jeeze, you're the ghot of PH. I provided one correct way to solve his problem with one interpretation and you did another. I thought people have had this talk with you before.

This post was edited by AbDuCt on Jun 19 2016 09:50pm
Member
Posts: 14,631
Joined: Sep 14 2006
Gold: 575.56
Jun 20 2016 06:21am
Quote (AbDuCt @ Jun 19 2016 09:47pm)
And what did you not understand about him knowing it would not work and his friend needing a correction. Do you think ferf would of mentioned it being a unary operator he was looking for before catre made the post? He never even mentioned if he required the not operator as the only single operand operator or not.

Just get your head out of your ass jeeze, you're the ghot of PH. I provided one correct way to solve his problem with one interpretation and you did another. I thought people have had this talk with you before.

i just took him at his word and figured his friend said something like "ya know you can use a unary operator the ! to check if a booleans true"

and no "people" never had any talks with me just you throwing a fit cuz i wont suck your dick for writing redundant code and fawning over scripting languages
Member
Posts: 13,425
Joined: Sep 29 2007
Gold: 0.00
Warn: 20%
Jun 20 2016 10:44am
Quote (Ideophobe @ Jun 20 2016 08:21am)
i just took him at his word and figured his friend said something like "ya know you can use a unary operator the ! to check if a booleans true"

and no "people" never had any talks with me just you throwing a fit cuz i wont suck your dick for writing redundant code and fawning over scripting languages


So you assumed what he wanted, just like I did.

You are also one to forget, practically half the active posters here have told you to shut up and stop being a nuisance. You seem to throw fits trying to correct everyones code and then justify how your own is superior, or at least post in a condescending why putting people down either directly or in directly. You don't seem to get this is a collaborative forum much like stack overflow (OH GEEZE I RECALL SAYING THIS ONCE BEFORE) in which everyone and anyone can answer a question and then the author can choose the correct one.

Do both our answers provide correct functionality? I'll let you open up your IDE and test that out :P

Also what ever happened to your AI project I was really hoping to bounce some ideas off you. Lmk Drake.

This post was edited by AbDuCt on Jun 20 2016 11:09am
Member
Posts: 14,631
Joined: Sep 14 2006
Gold: 575.56
Jun 20 2016 10:16pm
i'm not playing this game with you
grow up
Go Back To Programming & Development Topic List
Prev12
Add Reply New Topic New Poll