Properties
Miles
_______ at _______.____
Fri Jan 9 04:18:37 PST 2009
Nick Sabalausky wrote:
> Well, like I said, *If* we were to get overload-on-return-value. Not that
> I'm itching for it or anything. I've just seen the idea discussed before and
> if it hypothetically were to happen, then the above could work as a getter
> equivilent.
Ok. But I think such feature would create a mess. For example:
int func1() { ... }
char[] func1() { ... }
void func2(int x) { ... }
void func2(char[] x) { ... }
func2(func1()); // what is the expected behavior?
When you are inferring types, you need somewhere to anchor the compiler
decision, either on the sender or on the receiver side.
More information about the Digitalmars-d
mailing list