[chuck-users] static function overloading
signal.automatique at gmail.com
Tue Sep 8 12:06:52 EDT 2009
> I forget - what separates static functions from other kinds of functions?
They can only reference other static members and variables. That may
sound like a downside but it also means they can be called without a
This becomes useful in the case of functors (see the recent forum
discussion), for example. Right now if we want overloading we also
must create object instances of all extended classes. Right now this
isn't much of a issue aside from me finding those extra lines ugly
because they don't actually do anything useful (well, aside from
making it work at all), but I anticipate problems if/when the much
desired include functionality would get here.
I would like to be able to extend classes without needing a object
instance when instances don't actually do anything meaningful in the
case that I might have.
To me this seems like a solid case but it wouldn't be the first time
that the nice people with ".cs." in their email address would expose
me for the hack that I am ;-). The error message implies that the
matter has been given some thought but I don't get what the reasoning
More information about the chuck-users