Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
DEAL: For $25 - Add A Second Phone Number To Your Smartphone for life! Use promo code SLASHDOT25. Also, Slashdot's Facebook page has a chat bot now. Message it for stories and more. Check out the new SourceForge HTML5 internet speed test! ×

Comment Re: My gripes with the first 2 (Score 1) 524

No one is saying nulls are always bad. What's being said is that nulls should never mean "indeterminate state". They should always mean something.

You say it's a missing relationship. But that's one example of a meaning for null. One that makes sense to someone who's doing database work all the time, or who thinks of object graphs as databases. It's certainly not the only use people make of nulls.

Comment Re:My gripes with the first 2 (Score 1) 524

Absolutely, loading something from a file is a case where you would want to allow null returns, optionally also an error code.

But many other functions are either guaranteed to be able to return the correct value, or to have a suitable default.

My point is to know the difference, and only allow nulls when you have a good reason to. Never because of an ill-defined "there might be an error".

Null has to mean something. It should never be a vague possibility because "shit happens".

I don't think we have different opinions on this.

Comment Re:My gripes with the first 2 (Score 2) 524

For a given function, null return either has a meaning or it does not. "Something went wrong" is not a good enough reason to return null, unless your function documentation says what might go wrong and what that null therefore means.

If null has no meaning then make it a notnull return, or in Swift a non-optional.

I used to work with a programmer that used to make all returns optional "just in case". I wanted to punch him.

Comment Re:So they just reinvented the docking station? (Score 1) 76

I'm not going to argue your interpretation of individual phrases. This patent is for a phone placed where a touchscreen would be in a laptop, so that it can be used for both touch and display.

The Atrix Lapdock had the phone vertically behind the laptop screen where it could not be used for touch or a secondary display.

Completely different.

Comment Re:So they just reinvented the docking station? (Score 1) 76

I didn't say every claim contained something new. But the patent does. 2 examples:

"4. The electronic accessory device as recited in claim 3, wherein the operational component comprises an accessory display configured to present visual content. "

"5. The electronic accessory device as recited in claim 4, wherein the electronic host device comprises an input device configured to detect a touch event. "

Neither of these are present in the Atrix Lapdock, as it places the phone behind the laptop screen. The Apple patent has the phone placed where a touchscreen would be in a laptop, and that's what make these two claims possible.

Comment Re:So they just reinvented the docking station? (Score 2) 76

This is a fundamental misunderstanding of patents. All patents have prior art. Indeed they list the prior art in the patent. Patents take something that is already patented, and add some new things. Patents are never for something that is entirely new, the always build on what came before.

Slashdot Top Deals

"I may be synthetic, but I'm not stupid" -- the artificial person, from _Aliens_

Working...