| « Prev | Page 1 | Page 2 | Page 3 | Page 4 | Next » |
|
What's wrong with that piece of code? isn't that standard C++?
|
|
Seriously, are you not familiar with filenotfoundian algebra?
|
"... I will succumb to my own false dichotomies!" You should adjust that third value to "InMyOtherJacket". It makes the output easier: The answer is _____. Sincerely, Gene Wirchenko |
Obviously there are never 2 choices...always 3. True, False, or FileNotFound black, white, or apple yes, no, or car paper, plastic, or shoe -ds |
|
or indeed true, false or null...
|
|
All my apps have the following enum: public enum MostlyBool |
|
This guy and his fuzzy logic are way too advanced for my limited mind.
|
|
In one app of mine, to see if the user can edit fields in a form:
The last three values mean "no" :) |
|
No, I will not succumb to your FileNotFound dichotomies!
|
|
Const True as Int = -1
Const False as Int = 0 Const Maybe as Int = 0.5 |
|
...and later on down the code there is the ubiquitous IsTrue() function.
|
|
We all know this is wrong ...
Should have been enum Bool |
|
I'm surrounded by code written by morons. Complete... utter...
morons. Just... oh fu** it nevermind. Just look: /// <remarks/> [System.Xml.Serialization.XmlTypeAttribute(Namespace="<snip>")] public enum BoolEnum { /// <remarks/> @false, /// <remarks/> @true, } |
The problem with opponents of basic modal logic, of course,
|
The more subtle WTF is that, by default, True is 0 and False is 1. Which is completely bass-ackwards. |
wait, wouldn't this assign: True <- 0 in C/C++? what language is this? |
i would like to transmogrify into a tiger. |
|
My favorite part about this is the following:
int main() { if(True) { printf("True is true\n"); } if(False) { printf("False is true\n"); } if(FileNotFound) { printf("FileNotFound is true\n"); } } |
I was wondering the same thing, since Bool is a reserved word in Java/C#... they superceded the Bool class?!?!! wtf?!?!! Now you have System.Boolean and WTF.Bool. How con-vieeeeeeeeeeean-yant. |
Transform! More than meets the eye! |
|
Aha!
In UNIX, everything is a file! memory, devices, process info, PCI bus... and, uh, files (duh!) So, this makes perfect' sense! ': enum {perfect = 0}; |
|
idiot! True, False, HowTheHellDidThisHappen |
North, South, or Dennis |
|
boolean, not Bool, is reserved in Java as a primitive type, and there's also a Boolean class. I don't know about C#. In C/C++ it depends on compiler if it's even supported, but for every compiler I've worked with it is bool, not Bool, that is reserved. Sincerely, I'm cooler than Gene W-name |
|
May be part of his brain is in a quantum universe... He's trying to add another dimension to our world !!!
|
|
And in Soviet Russia, the file is you!
|
|
Er, wouldn't that be a trichotomy ?
|
Er, wouldn't that be a trichotomy? (One of these days I'm going to get quoting right) |
|
OK, I give up. What about HTML?
|
Below the writing area, there are two options: "design" and "HTML". Select the "HTML" option. Use a browser that can render the options, like Internet Explorer. Remember to use & for &, > for >, < for <, etc. and <p> tags for nice paragraphs and <pre> tags for code. |
|
0, 1, and sqr(-1)?
|
Actually, you should use <blockquote><pre> </pre><blockquote> for blocks of code. And <code> for inline code, such as BTW, Firefox handles that just fine. |
Bah, forgot to close the blockquote, and s/of/or. |
Us SQL developers know this should really be enum Bool |
No no - it's almost, but not quite, entirely unlike tea. Thus spake the Holy Prophet of Douglas Adams. |
0.5 as an Integer..... very interesting! ^o) |
Re: Sql Developers know what this should be
2005-10-24 15:27
•
by
WTFer
|
Us Electronic Engineers now that it should really be |
Re: Sql Developers know what this should be
2005-10-24 15:29
•
by
WTFer
|
|
That would be:
enum Bool{ VCC, GND, Z } |
|
We have languages wherein "everything" non-zero is "true" ... at least
this one uses an enum to limit the choices. Since the language in this WTF seems a little ambiguous (C/C++? Java?), let's at least hope it's a type enforcing language. It does explain some of the stranger "file not found" messages I get :) Have we already forgotten "An unnamed file was not found"? [Any other 'unregistered' users noting the captcha verification misses the first word sometimes?] |
|
In the fashion of fuzzy logic, I say he updates this code to be "True", "False" and "Maybe". |
Silly me, I was in such a hurry to comment I didn't know that. That's as big as a WTF as the fact he has a 3 value boolean! |
|
Whose turn is it to explain why this isn't all that bad after-all?
|
|
What about "maybe"?
|
|
"I will not succumb to your FileNotFound dichotomies!"
|
But... what does IsTrue(KindaSortaNotReally) return? We need another level of the enum for... "Probably" |
I'll take a stab. This looks like C++. Maybe he's used to coding with HResults. If that's the case, he's used to 0 meaning "good", negative meaning "error", and positive meaning "warning". Maybe this Bool type is supposed to be an HResult. It's interesting that he could define IsTrue something like this: bool IsTrue(Bool b) { return !b; } |
|
I don't think people are seeing the value in this. In standard logic, the statement "all deep-sea dwelling elephants can fly" is true. With this addition, the answer is now FileNotFound; a much more satisfying answer. |
|
In that case it's a WTF for calling it a bool.
|
UNIX would beg to differ:
|
| « Prev | Page 1 | Page 2 | Page 3 | Page 4 | Next » |