News for hackers. Stuff that matters.
Re:Underscore is a keyword in Java 9, use this script to che... by nrjdhsbsid on Saturday January 14, 2017 @02:26PM (#13400065)
Hahahaha

Edit: I'm a Java guy too, don't get why some people get so butthurt over things :)

At least it's not JavaScript with infinity,null,undefined, and NaN. Oh and null!=null which is hilarious

Re:Underscore is a keyword in Java 9, use this script to che... by crazy2be on Saturday January 14, 2017 @03:31PM (#13400398)
You mean NaN != NaN. null == null is true, and null != null is false.

NaN != NaN is surprising, but is not unique to JavaScript. As far as I know, this is the case in every language, and is mandated by the IEEE 754 specification.

However, it does come up in JavaScript more often than other places, since NaN is really easy to get (+{} => NaN, 1 - '' => NaN, etc, etc).

Re:Underscore is a keyword in Java 9, use this script to che... by nom on Saturday January 14, 2017 @02:58PM (#13400239)
LOL yeah.. don't get me started about JS :D.

I more of a C++ guy, but I like Java very much and have used it extensively in the past. I personally like a good C/C++ joke and can't understand why the Java devs are so serious. Apparently nobody is allowed to joke about Java, it's serious business :D

Re:Underscore is a keyword in Java 9, use this script to che... by mhink on Saturday January 14, 2017 @03:15PM (#13400321)
For what it's worth, you should _always_ be using triple-equals in Javascript unless you have an overwhelmingly good reason not to. Many of the weird Javascript-isms people like to complain about are due to surprising type coercions, which don't happen with triple-equals (which behaves as you would expect- value equality without type coercion for primitive types and reference equality otherwise.)
Re:Underscore is a keyword in Java 9, use this script to che... by echelon on Saturday January 14, 2017 @03:29PM (#13400386)
For someone who uses a more than one language on a regular basis, triple equals is an annoying break with convention. It shouldn't be that easy to make a mistake by simply missing an extra character. This is one of many reasons I've taken to using TypeScript for all of my web frontend projects.
Re:Underscore is a keyword in Java 9, use this script to che... by robocat on Saturday January 14, 2017 @05:37PM (#13400993)
However you still run into the same problems with > , < , <= , and =>. So you need to really really understand the corner cases (same as with C++).
Re:Underscore is a keyword in Java 9, use this script to che... by grkvlt on Saturday January 14, 2017 @10:19PM (#13402104)
In SQL, 'NULL <> NULL' is true as well, you have to use 'NULL IS NULL' instead, so the concept has a long and somewhat respectable pedigree...