Hacker News new | ask | show | jobs
by edgyswingset 4370 days ago
Actually the way you check for Google Play services doesn't involve nulls at all, it's a status code.

And related to null-checking, I took the pervasive approach in one of my apps for fun. It's hilarious - almost 1/3 of my app is checking if something is null. Makes you wish for a switch to a language where nulls don't exist unless explicitly asked for.

1 comments

Not always. If you use maps, for instance, then calling getMap on a map fragment when Play Services isn't installed will give you back a null reference.