On 02/02/2016 16:49, Sven Barth wrote:


> also if we are discussing (are we?) a form like
>   x:= iIf a>b  iThen c iElse b;
> then why not
>   x:=  a>b  ifThen c ifElse b;

Because I won't add new keywords just for this feature, especially if they are inside normal code (I'm a bit less strict outside of routine bodies ;) ).

Ah, ok: "iif" (as none function) is of the table too. I had not gotten that from the discussion so far.

But fair enough, if they would become keywords, then I agree the impact on existing code would be potentially massive.

In this case, I dislike the
   x := if a then b else c;

While at first easier to read (no need to know that IfThen or IIF is an intrinsic), it resembles (I am aware it is not, but it still resembles) a statement, and opens the door to discussions that other statement should return values too.
Like x := y := 1; which is not desirable at all.

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

Reply via email to