Am 2013-03-16 07:13, schrieb Xiangrong Fang:
I would like to do this:

with MyClassInstance as mci, SomethingElse do begin
  Caption := 'A new caption';
  for i := 0 to Count - 1 do
mci[i] := UpperCase(mci[i]);
end;

That is, to add an optional "as" clause to the with statement so that access 
array element in a structure is made easier.

I fail to see how this would be helpful.
It's just more confusing.
Suddenly there are 2 (or more?) identifiers meaning the same thing.
If I want to avoid typing a long identifer name multiple times
I would simply select it and copy it to the clipboard.
If someone (I myself?) chose a long identifier name I think it was for some 
reason (readability?).
Foiling this by making the code more obscure is not a good idea IMO.
That's making the code a bit more C'ish (harder to read).
You won't cripple down all variables to one letter names A, B, C only because 
this is easier to type, won't you?
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to