Christian Gollwitzer <
auri...@gmx.de> wrote:
> Am 11.04.18 um 08:37 schrieb Arjen Markus:
>> On Tuesday, April 10, 2018 at 11:05:15 PM UTC+2, Donal K. Fellows wrote:
>>> On 04/04/2018 13:35, Christian Gollwitzer wrote:
>>>> I think the reason is bugwarts compatibility.
>>>
>>> Yes. There are scripts that use [incr someArgument 0] as a form of
>>> integer argument type assertion.
>>>
>>
>> That could have a floating-point pendant like:
>>
>> incr someArgument 0.0
>
> The point of Donal is that:
>
> (chris) 53 % set a 3.5
> 3.5
> (chris) 54 % incr a 0
> expected integer but got "3.5"
>
> will not throw an error in future Tcl, when incr accepts floats,
> since 0 can be added to both integers and floats. It would be much
> more surprising if "incr" only incremented floats if the offset is
> also a float.
>
> This has been apparently misused lazily as an argument checking
> facility, instead of "if {[string is integer ...]}".