Hi,<div><br></div><div>Actually, this sort-of makes sense. šI find "as" or something similar to be more aesthetically pleasing, but @ seems to make it clear that the identifier is just an alias (pointer address), and not a real temporary variable. š</div>
<div><br></div><div>Of course I would be happy for any keyword or syntax that actually allows this to be done. šTheoretically you could already use "absolute" instead, but...</div><div><br></div><div>Thank you,</div>
<div>š š Noah Silva<br><br><div class="gmail_quote">2013/3/20 Lukasz Sokol <span dir="ltr"><<a href="mailto:el.es.cr@gmail.com" target="_blank">el.es.cr@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 18/03/2013 03:11, Paul Ishenin wrote:<br>
> 18.03.13, 9:27, Xiangrong Fang ÐÉÛÅÔ:<br>
>> I am sorry I didn't follow this thread although I am the "OP" :-). š If<br>
>> I understand correct, I would suggest NOT introduce the "absolute"<br>
>> keyword, instead, make it ALWAYS absolute. i.e.:<br>
>><br>
>> with a = SomeObject, b = SomeRecord do begin<br>
>> š š... ...<br>
>> end;<br>
>><br>
>> Both a and b are "reference" to the object or record, IMO there seems no<br>
>> need to do assignment in the with syntax. Thus, I suggest use = instead<br>
>> of :=<br>
><br>
> '=' can't be used because it can be a part of expression. There is no big difference between<br>
> with (a = SomeObject) do<br>
> and<br>
> with a = SomeObject do<br>
><br>
> After more thinking I see that ':=' as well as absolute keyword are also bad because they will complicate the parser (although it is possible to use them). Parser will need to read the first token and check if it is an identifier, read second token and compare with ':=' (or 'absolute') and if it is not ':=' (or 'absolute') return to expression parse.<br>
><br>
> At the same time we will not complicate the parser if we place alias identifier after the with expression like:<br>
><br>
> with expression1, expression2 => alias2, expression3, expression4 => alias4 do<br>
><br>
> begin<br>
><br>
> end;<br>
><br>
> Where '=>' is some token which can't be used in expressions.<br>
><br>
</div>For example '@' ?<br>
<br>
e.g.<br>
with alias1@SomeLongObject, alias2@SomeOtherLongObject, ... do<br>
<br>
rationale:<br>
it's sufficiently different, and as for its nominal usage, it does similar<br>
thing.<br>
<br>
?<br>
<br>
> Best regards,<br>
> Paul Ishenin<br>
><br>
<span class="HOEnZb"><font color="#888888"><br>
Lukasz<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
_______________________________________________<br>
fpc-pascal maillist š- š<a href="mailto:fpc-pascal@lists.freepascal.org">fpc-pascal@lists.freepascal.org</a><br>
<a href="http://lists.freepascal.org/mailman/listinfo/fpc-pascal" target="_blank">http://lists.freepascal.org/mailman/listinfo/fpc-pascal</a><br>
</div></div></blockquote></div><br></div>