Re: [android-developers] Re: Can this variable become null?
This is basically my point: I don't believe you should never use them,
it's just that many people present them as an "easy obvious solution"
to something that comes with lots of overhead.
Many times they *can* be replaced by specific components. Sure, there
are counterexamples and optimizations (e.g., many apps hold sockets in
an application context), but these (in my experience) tend to be the
exception rather than the norm.
Kris
On Fri, Mar 15, 2013 at 11:04 PM, William Ferguson
<william.ferguson@xandar.com.au> wrote:
> I wasn't going to enter back into this discussion because it's one of those
> that polarises like checked Exceptions.
>
> I also use singletons, but on a rare and very precise basis. And if you have
> mentored as many developers as I have then you will understand why the
> default mantra of don't use a singleton is valid. Junior developers seem to
> become infatuated with them, overuse them, lose all perspective of the OO
> nature of the language and start treating them as global functions.
> Encapsulation and responsibility go out the window.
>
> And on top of that you get all the attendant problems of objects with
> indefinite life spans.
>
> If you know what you are doing, fine. But it's similar to the mantra we give
> kids "don't run with scissors".
>
> William
>
> --
> --
> 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+unsubscribe@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+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
--
--
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+unsubscribe@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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home