[fpc-pascal] Re: StrUtils.RomanToInt oddities

Sven Barth pascaldragon at googlemail.com
Tue Sep 24 11:21:07 CEST 2013


Am 24.09.2013 11:07, schrieb Frederic Da Vitoria:
> 2013/9/24 Reinier Olislagers <reinierolislagers at gmail.com 
> <mailto:reinierolislagers at gmail.com>>
>
>     On 24/09/2013 09:09, Marco van de Voort wrote:
>     > In our previous episode, Bart said:
>     >>> Raise an exception
>     >>
>     >> This will break existing implementations that either expect IM
>     to be
>     >> 999, or ABC to be 0 (indicating failure), and that certainly do not
>     >> expect that this function throws an exception at them.
>     >
>     > Yes, but since the routine probably has low utilisation I choose for
>     > structuring all conversion routines all the same.
>     I would rather choose for maintaining backward compatiblity, the *de
>     facto behaviour* (return 0 on invalid values) as it is quite sensible
>     for this kind of numbers.
>
>     > Moreover I don't think that first attempts should fixate interfaces
>     > and behaviour forever.
>     It's quite strange though that Delphi compatibility is quite
>     insistently
>     adhered to (BTW a good decision IMO).
>     The function has been in FPC stable (for presumably a while?) so I
>     would
>     really think hard before changing it.
>
>
> I could not find any trace of it on the embarcadero web site. Wouldn't 
> we be taking into account a compatibility with something which does 
> not exist, by any chance?
When there is no Delphi-compatibility needed there is still backwards 
compatibility to code developed in FPC.

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20130924/b3109d2e/attachment.html>


More information about the fpc-pascal mailing list