Thread overview | |||||
---|---|---|---|---|---|
|
August 11, 2003 Overloading function call operator | ||||
---|---|---|---|---|
| ||||
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). |
August 11, 2003 Re: Overloading function call operator | ||||
---|---|---|---|---|
| ||||
Posted in reply to mjm | 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). > > |
August 11, 2003 Re: Overloading function call operator | ||||
---|---|---|---|---|
| ||||
Posted in reply to mjm | 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.
|
Copyright © 1999-2021 by the D Language Foundation