[fpc-pascal] New feature: IfThen() intrinsic

Maciej Izak hnb.code at gmail.com
Mon Feb 1 10:31:36 CET 2016


2016-02-01 10:17 GMT+01:00 Michalis Kamburelis <michalis.kambi at gmail.com>:
>
> As far as I understand, compatibility is not broken: new IfThen was
> deliberately introduced as part of the System unit, that is implicitly
> always used as the 1st unit. If you use Math (or StrUtils or any other
> modules that provide IfThen implementations), they will "cover" the
> System.IfThen definition. So your code will continue to work as it was.
>
> And the name like FpIfThen look rather ugly, actually. As far as I'm
> concerned, IfThen sounds simple and Ok.


IfThen is not ok. It can potentially break compatibility. The probability
is huge. IfThen is in many cases the only function that is used from Math
or StrUtils. I have big codebase to maintain which is refactored very
often. The risk to omit Math and StrUtils is very big.

It can be very hard to debug.

There are so many ways to implement this and was chosen the worst scenario.
:\

-- 
Best regards,
Maciej Izak
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20160201/2fcb9bc7/attachment.html>


More information about the fpc-pascal mailing list