News for hackers. Stuff that matters.
Re:Yoda Conditions by efaref on Friday February 17, 2017 @12:07PM (#13669826)
Not sure I like the sound of that. It sounds like the floating point wat of "NaN != NaN".
Re:Yoda Conditions by koolba on Friday February 17, 2017 @12:33PM (#13670057)
Or the SQL classic:

    NULL = NULL
It's not true or false, ... it's NULL!
Re:Yoda Conditions by mikeash on Friday February 17, 2017 @01:07PM (#13670328)
Making messages to nil be a no-op is certainly an "interesting" feature of Objective-C. It can make some code a lot more convenient to write, but it can also make certain bugs really difficult to track down.

After having done Swift for a while, I'm a big fan of using an option type so that "reference to object" is a different static type altogether from "reference to object, or nil."

Re:Yoda Conditions by efaref on Friday February 17, 2017 @01:31PM (#13670508)
Yes, I really like Rust and the way its Option<Box<T>> decays to a nullable pointer.