On 11-03-09 5:30 PM, "Kenny Riddile" <[email protected]> wrote:
>On 3/9/2011 5:13 PM, TreKing wrote: >> On Wed, Mar 9, 2011 at 4:10 PM, Kenny Riddile <[email protected] >> <mailto:[email protected]>> wrote: >> >> Singletons are global variables. >> >> >> Uh ... no ... no they're not. >> >> >>------------------------------------------------------------------------- >>------------------------ >> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago >> transit tracking app for Android-powered devices >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Android Developers" group. >> To post to this group, send email to [email protected] >> To unsubscribe from this group, send email to >> [email protected] >> For more options, visit this group at >> http://groups.google.com/group/android-developers?hl=en > >Assuming the singleton is modifiable via its interface, then for all >intents and purposes, yes, they are. I think the idea is that because the singleton is encapsulated, you at least have some business logic around mutating them, whereas the "classic" global variable is visible AND mutable without restrictions. - Scott -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

