On Sun, Jul 14, 2013 at 10:19 PM, TreKing <treking...@gmail.com> wrote:
>
> On Sun, Jul 14, 2013 at 5:22 PM, Palmer Eldritch <the.u...@gmail.com> wrote:
>> Receiving an object one hasn't the slightest idea about is apparently the
>> android way - may be null or not - who cares as long as we can add an if
>
>
> This is not the "Android way" - this is the "programming against any library
> ever created" way. Anytime you use any library that you yourself did not
> write or have the source to, and is not clearly documented, you will have
> the same issue.
>
> Now I'm just curious why you're so invested in this one function and if you
> spend this much time determining the validity of every variable you get in
> every method you employ from every external library you use? If not, why the
> fascination with this one method?

I think this is probably a valid thing to consider in most APIs,
especially if they're statically linked APIs, where you can actually
check. The documentation should also specify the conditions under
which this should happen, to be fair.

I think the problem here is something that should be clarified in the
documentation,  I'd assume since it's not you should follow the safe
practice of checking values or letting them crash and get reports
after testing on your end with a test suite.  But again, this is much
more to do with the dynamically linked nature of the Android
framework, as opposed to a static library (where you usually *can*
check what the case is).

Kris

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to