Arne Vajhoj to Anton Shepelev:
> > As one coming to C# from Pascal and practising pro-
> > cedural programming, I am regularly annoyed by the
> > inability to pass properties as `out' and `ref' pa-
> > rameters. Don't you think that C# should be smarter
> > and higher-level than that, and treat those parame-
> > ters as an algernative method of assignment. That
> > way, whenever a.b = c; works, proc(out a.b) shall
> > work too, as long as the `out' parameter has the
> > type of `c'. Will it not make `out' and `ref' param-
> > eters conceptually simpler and more useful?
> I am not sure that it will be that much used (out and
> ref are generally pretty rare).
As one who prefer procedural programming to OOP, I use
them quite frequently, and C# being a multiparadigm lan-
guage, my proposal seems not against the grain of it.
> But on the other hand I don't think there is any doubt
> about the programmers intention matching the proposed
Glad to hear that. Yes, I think my proposal will make
out and ref parameters conceptually simpler: a more gen-
eral way to return data from methods.
> You can try suggest it to the C# team (I doubt they
> read here).
Sure, but I wanted some informal feedback from you in-
cluding thee. Thank you.
() ascii ribbon campaign - against html e-mail
- against proprietary attachments