<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2013/9/24 Reinier Olislagers <span dir="ltr"><<a href="mailto:reinierolislagers@gmail.com" target="_blank">reinierolislagers@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>On 24/09/2013 09:09, Marco van de Voort wrote:<br>
> In our previous episode, Bart said:<br>
>>> Raise an exception<br>
>><br>
>> This will break existing implementations that either expect IM to be<br>
>> 999, or ABC to be 0 (indicating failure), and that certainly do not<br>
>> expect that this function throws an exception at them.<br>
><br>
> Yes, but since the routine probably has low utilisation I choose for<br>
> structuring all conversion routines all the same.<br>
</div>I would rather choose for maintaining backward compatiblity, the *de<br>
facto behaviour* (return 0 on invalid values) as it is quite sensible<br>
for this kind of numbers.<br>
<div><br>
> Moreover I don't think that first attempts should fixate interfaces<br>
> and behaviour forever.<br>
</div>It's quite strange though that Delphi compatibility is quite insistently<br>
adhered to (BTW a good decision IMO).<br>
The function has been in FPC stable (for presumably a while?) so I would<br>
really think hard before changing it.<br></blockquote><div><br></div><div>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?<br>
<br><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
> And let's not beat about the bush: the main reason for the routine is to<br>
> show beginning programmers that their homework can be done using a fixed<br>
> function :-)<br>
</div>Nice going to show beginning programmers how to break backward<br>
compatibility then ;)<br></blockquote></div><br></div><div class="gmail_extra">Well, the alternative would be showing how to maintain buggy implementations because you don't want to break backward compatibility :-) Or it could show that sometimes rules have to be infringed. Or it could show the merits of exploring thoroughly the limits of a problem before committing code which could later place you in such a conflicting situation (I am not throwing stones to the developer who committed this function first, I have too often done the same mistake myself)<br clear="all">
</div><div class="gmail_extra"><br>-- <br>Frederic Da Vitoria<br>(davitof)<br><br>Membre de l'April - « promouvoir et défendre le logiciel libre » - <a href="http://www.april.org" target="_blank">http://www.april.org</a><br>
</div></div>