Re: LINQ vs Delphi





> Obviously. You don't put /var/ in the actual argument list, it
> goes in the formal parameter list. His concern, and mine too for
> that matter, is that it makes the code less clear when reading the
> *calling* code, that a parameter passed might be chaged by the
> called routine.
>
> In C# this is obvious since the /ref/ keyword is present -in the
> call-. In C this is obvious since & is present -in the call-.
> In Delphi it is not obvious without looking at the formal parameter
> list.

Exactly - anyone who has done any maintenance/enhancement work will know
what a nightmare 'var' parameters can be when trying to unravel someone
else's undocumented code. It's all very well saying 'look at the formal
list', but when you have 50 units of someone else's gunge and a week to get
something working, there is only so much distraction you can take - flitting
about between units to check the called parameters list is a PITA I could do
without. It would help if the editor/codeInsight highlighted actual var
parameters in a different colour.

Rgds,
Martin


.