[fpc-devel] new features and facilities
Sven Barth
pascaldragon at googlemail.com
Thu Oct 8 23:07:51 CEST 2015
Am 08.10.2015 19:10 schrieb "Ralf Quint" <freedos.la at gmail.com>:
>
> On 10/8/2015 9:54 AM, Sven Barth wrote:
>>
>>
>> I had the idea to implement inline-if as well. I think the syntax I
selected is derived from Oxygene, but it looks very Pascal and shouldn't
break anything:
>>
>> left := if expr1 then expr2 else expr3;
>>
>> Thereby expr1 returns Boolean and expr2 determines the type of the whole
inline-if, thus expr3 needs to be compatible to expr2.
>>
>>
> Sorry, but that doesn't "look Pascal" at all, and is anything but easily
understandable, specially given the possible complexity of expr[1,2,3]...
And you think C's ternary would be more Pascal? Also you need /some/
definition of what defines the type no whether what syntax you choose (in
addition expr1 is the same as in normal ifs, so it's only the "complexity"
of expr2 and expr3). And no, "the left side" is not the Pascal answer
either.
Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20151008/a4c106c8/attachment.html>
More information about the fpc-devel
mailing list