On Mon, 1 Feb 2016, Maciej Izak wrote:

2016-02-01 11:28 GMT+01:00 Sven Barth <pascaldra...@googlemail.com>:

I have to admit though that I forgot about the potential problems due to
refactoring. I'll change the name to avoid this pitfall, though I've yet to
decide which one.


My proposition is:

function &if(Condition: Boolean; ThenExpr, ElseExpr: type): type;

& is used rarely (and it is legal ident part), collision with existing code
base is minimal. Looks almost like regular Pascal syntax ;).

No. The compiler already uses &.

& means 'the following is an identifier even if it is a keyword'.

You can perfectly declare and compile:

Var
  &if : integer;

begin
  &if:=1;
end.

So &if is a bad idea.

Michael.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to