Anton Shepelev
2022-08-31 10:05:52 UTC
Hello, all
As one coming to C# from Pascal and practising proce-
dural programming, I am regularly annoyed by the in-
ability to pass properties as `out' and `ref' parame-
ters. Don't you think that C# should be smarter and
higher-level than that, and treat those parameters as
an algernative method of assignment. That way, whenev-
er 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' parameters conceptually
simpler and more useful?
As one coming to C# from Pascal and practising proce-
dural programming, I am regularly annoyed by the in-
ability to pass properties as `out' and `ref' parame-
ters. Don't you think that C# should be smarter and
higher-level than that, and treat those parameters as
an algernative method of assignment. That way, whenev-
er 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' parameters conceptually
simpler and more useful?
--
() ascii ribbon campaign - against html e-mail
/\ http://preview.tinyurl.com/qcy6mjc [archived]
() ascii ribbon campaign - against html e-mail
/\ http://preview.tinyurl.com/qcy6mjc [archived]