I have written a lot of AS3 code with classes and before that was mostly a Java developer and I have yet to have written an AS3 project that has used private classes for anything at all but singleton enforcement.

I'm trying to get a handle on whether I've been missing out or people are using private classes where they weren't needed.

Does it really matter that much? perhaps not. For me, private classes are some secret coding hidden from the world and segregated from the main class. If a class is important, it's probably important enough to be a public class. If it's not that important I suspect it could have it's functionality coded as a helper function for the main class.

I have never really been a fan of private classes because IMHO they introduce added complication, quietly, where it's probably not needed - hence my search for an example to change my mind about this.

Anyone have a concrete example where a private class suits perfectly (and doesn't involve singletons)?

This is your chance to educate me.

On 27/05/2013 11:47, Cor wrote:
I use this for objects only needed in the scope of that particular class.
I don't know if this is "the best solution"...
I guess this depends on what you are trying to achieve.
It works for me.

Regards
Cor

On 27 May 2013 12:24, Paul A. <p...@ipauland.com> wrote:

Out of curiosity, has anyone on the list actually used private classes
for anything other than enforcing singleton creation?

If you have, please tell us and say why it was the best solution.



_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to