JavaScript: The Curious Case of null >= 0
111–120 of 152 posts
Re: JavaScript: The Curious Case of null >= 0
#112Earlier quoted context omitted.
FWIW, for the downvoters: you really should look 'lisper up. I'm not sure I agree with him but the incredulity shown here is unwise.
The down votes are likely for trying to invoke an ad hominem argument. No matter someone's credentials, it's still a logical fallacy and something to be avoided. If he is an authority on the subject, it should show through in his comments. I'm sure he's a very smart and knowledgable person. But there are a lot of smart and knowledgable people here and by invoking his credentials, he's presuming that the people he's t…
The comment speculating on the "OTHERWISE" clause is the kind of brilliant off-beat thinking that challenges the level of understanding of the reader.
The people scoffing at and downvoting it are, however smart and knowledgeable they may be, ignorant or foolish. If they thought it through they might learn something.
It's a perfectly valid response to say, "Hey wait a minute, I know what I'm talking about here." It's not appeal to authority, and it is certainly not an ad hominem since the people he's talking to have shown that they don't understand.
Re: JavaScript: The Curious Case of null >= 0
#113Re: JavaScript: The Curious Case of null >= 0
#114Earlier quoted context omitted.
The down votes are likely for trying to invoke an ad hominem argument. No matter someone's credentials, it's still a logical fallacy and something to be avoided. If he is an authority on the subject, it should show through in his comments. I'm sure he's a very smart and knowledgable person. But there are a lot of smart and knowledgable people here and by invoking his credentials, he's presuming that the people he's t…
Except 'lisper wasn't making an argument. He was responding to a case of somebody being socially jerkish in a way that was pretty gentle, even for HN's coddling standards. That's important, because downvotes don't fix jerks--only pointing out the behavior does. Coming in hot with "oh but fallacies , hmm hmm, heaven forfend" when what's being suggested is "maybe don't be a jerk?" is not a great look , don't you think?
Go back and look at what he wrote. He basically said, "before you dismiss my idea as not having merit, go look me up." Ideas have merit independent of who has them. That's the point. He was citing his credentials to back up his earlier argument.
I'm not saying that the comment that he was replying to was right or even civil and had he left off his second "Oh, BTW..." line, it would have been a reasonable response. But including it not only speaks to the comment he was replying to but also to everyone who disagrees with his idea.
BTW...parodying what I said followed by condescension is also not a great look.
Re: JavaScript: The Curious Case of null >= 0
#115Earlier quoted context omitted.
It's not so much dynamic typing, but a lack of typing. Dynamic typing means that type checks are made at runtime. e.g. in Ruby: irb> nil >= 0 NoMethodError: undefined method `>=' for nil:NilClass and Python 3: >>> None >= 0 TypeError: '>=' not supported between instances of 'NoneType' and 'int' Obviously JS (and Python 2!) get this wrong, but to be fair JS was designed in the 90s.
I agree with everything you said, except for the part where you said JavaScript was "designed".
Re: JavaScript: The Curious Case of null >= 0
#116Earlier quoted context omitted.
Booleans having only three values would be an improvement for JavaScript where they actually have four : true, false, null and undefined
This is nonsense. If typeof(x) is 'boolean', then x is either true or false. Now, if you don't know the type of x and try to use it as boolean without being careful, it might look like it has four values. That comes partly from being dynamically typed and partly from performing coercion instead of throwing errors. So one might argue that Javascript encourages people to write code that's not careful, or that it's very…
No three-valued Boolean algebra exists.
Re: JavaScript: The Curious Case of null >= 0
#117Earlier quoted context omitted.
Except 'lisper wasn't making an argument. He was responding to a case of somebody being socially jerkish in a way that was pretty gentle, even for HN's coddling standards. That's important, because downvotes don't fix jerks--only pointing out the behavior does. Coming in hot with "oh but fallacies , hmm hmm, heaven forfend" when what's being suggested is "maybe don't be a jerk?" is not a great look , don't you think?
He was making an argument and its disingenuous for you to suggest otherwise. Go back and look at what he wrote. He basically said, "before you dismiss my idea as not having merit, go look me up." Ideas have merit independent of who has them. That's the point. He was citing his credentials to back up his earlier argument. I'm not saying that the comment that he was replying to was right or even civil and had he left o…
Lisper wasn't saying, "I'm right because I'm me."
He was saying, "Adjust your prior[1] for my statement given additional data about its source."
Re: JavaScript: The Curious Case of null >= 0
#118Earlier quoted context omitted.
The down votes are likely for trying to invoke an ad hominem argument. No matter someone's credentials, it's still a logical fallacy and something to be avoided. If he is an authority on the subject, it should show through in his comments. I'm sure he's a very smart and knowledgable person. But there are a lot of smart and knowledgable people here and by invoking his credentials, he's presuming that the people he's t…
> If he is an authority on the subject, it should show through in his comments. The comment speculating on the "OTHERWISE" clause is the kind of brilliant off-beat thinking that challenges the level of understanding of the reader. The people scoffing at and downvoting it are, however smart and knowledgeable they may be, ignorant or foolish. If they thought it through they might learn something. It's a perfectly valid…
Those words must have new meaning since he was citing as an example a language that's existed since the 70s. Ternary booleans are far from a unique or novel concept. The main difference is that for most languages, including Javascript, that third value exists at the variable binding or expression level, not the value level. Other languages that don't allow nulls encode that third value in a Maybe type. SQL, being a thin abstraction over data storage that needs to be able to encode nulls, doesn't make that distinction. That his idea was poorly worded to state that the actual Javascript value would have a third possibility rather than the comparison expression being nullable doesn't add to his credibility. The distinction between an expression evaluation, variable binding and a value isn't exactly a newbie concept, but for someone with the credentials he's claiming, I'd expect him to know it and be more precise.
> since the people he's talking to have shown that they don't understand.
Perhaps you should go back and read the exchange. The comment he was replying to was specifically about the mixture of Javascript and ternary booleans, not just ternary booleans. Also, if you re-read the comment that you're calling ignorant in the context of the authors original confusing of expression evaluations and values there's at least the possibility that he's making a very valid point, albeit in a way that can be read as confrontational. Javascript could already add an otherwise block without adding a third boolean value...all that would be necessary is to allow comparison operators evaluate to null or undefined and then execute the otherwise block in that case. Adding a third value would mean that a boolean variable binding could now have 5 values, true, false, not_true_or_false, null or undefined. That's nonsensical and deserves to be called out. It's bad enough that the language has null and undefined, since it causes a ton of confusion that could have been avoided. Adding some special "not null but sort of null" boolean value would just add more confusion to the language.
Re: JavaScript: The Curious Case of null >= 0
#119Earlier quoted context omitted.
He was making an argument and its disingenuous for you to suggest otherwise. Go back and look at what he wrote. He basically said, "before you dismiss my idea as not having merit, go look me up." Ideas have merit independent of who has them. That's the point. He was citing his credentials to back up his earlier argument. I'm not saying that the comment that he was replying to was right or even civil and had he left o…
I'm sorry but I think your pattern matching for "Argument from Authority" is misfiring here. Lisper wasn't saying, "I'm right because I'm me." He was saying, "Adjust your prior[1] for my statement given additional data about its source." [1] https://en.wikipedia.org/wiki/Prior_probability
> Oh, and BTW, before you completely dismiss the idea that my suggestion might have merit, you might want to look me up.
He wasn't saying "I'm right because I'm me." He was saying, "I'm me so don't assume I'm wrong." It's still an appeal to authority. Had his credentials been part of the first line, where he was confirming that he was serious about his previous post, then your interpretation would be correct.