www.digitalmars.com         C & C++   DMDScript  

D - Overloading function call operator

reply mjm <mjm_member pathlink.com> writes:
Please implement the overloading of the function call operator.
Then array indexing could be a special case of that and this is also useful
elsewhere (function objects, random number generators).
Aug 11 2003
next sibling parent "Matthew Wilson" <matthew stlsoft.org> writes:
I'm inclined to agree by (C++) instinct, but I think some example cases
would be good.

"mjm" <mjm_member pathlink.com> wrote in message
news:bh8esq$1crg$1 digitaldaemon.com...
 Please implement the overloading of the function call operator.
 Then array indexing could be a special case of that and this is also
useful
 elsewhere (function objects, random number generators).
Aug 11 2003
prev sibling parent Ilya Minkov <midiclub 8ung.at> writes:
mjm wrote:
 Please implement the overloading of the function call operator.
 Then array indexing could be a special case of that and this is also useful
 elsewhere (function objects, random number generators).
Won't closures also do? And no, it's not good enough for array indexing, since it would be useful to distinguish between array element getter and setter! -i.
Aug 11 2003