Posted by peter on 03/23/07 15:48
> Why use :: instead of -> then? hmm... I dunno, it's kewl? I've only used
> it once with a singleton where it seemed to make sense buy it's actually
> quite rare I think. People who work with objects big-time may have use for
> it, but I don't think it's actually all that necessary. It's good to have
> and good to know what it is and what it does, but on most days you'll be
> fine without it.
I think it is done to lower the overheads if for example you only need to
use 1 function within the class. Instead of having the overhead of
instantiating the class then calling the method (which I presume allocates
memory for the methods and properties).
[Back to original message]
|