Re: [exim] More integer annoyances in 4.65

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: David Saez Padros
Ημερομηνία:  
Προς: Marc Perkel
Υ/ο: exim-users, Tom Kistner
Αντικείμενο: Re: [exim] More integer annoyances in 4.65
Hi !!

>> if you do integer comparision between an empty or uninitialized string
>> with a number you are doing something wrong, only numbers should be
>> comprable with numbers. Assuming that an uninitilized string is zero
>> is bad as you do not know what zero means in the context where the
>> comparision was done, is the one that makes such comparision who should
>> ensure that this uninitialized string has a meaningful value and that
>> has been correctly initialized. If the string to compare is not a number
>> (including an empty string) this is an error made by the one who build
>> the comparison and if exim assumes that the empty string is zero this
>> error will probably never be noticed and also probably lead to
>> unexpected results.
>>
>
> If a computer compared a null to 0 you're right. But if a user does it
> then the programmer can decide to interpret a null as a 0 so as to make
> the software work in a way that is natural.


don't forget that we are talking about numeric comparisions where the
only natural thing is to compare numbers with numbers. In that case is
not the programmer who should decide if a empty string is equal to zero.
For the user it should not be the same 'zero' than 'i don't know', if
the user tries to compare numbers is because he expect that both terms
are numbers, if one of them is not a number then there is an error
somewhere else that should be fixed.

> A null and a blank string are not the same thing either. Are you going
> to treat strings that way too?


as a programmer, yes, they are totally different. Inside exim is not
possbile (as far as i know) to distinguish between an empty and an
uninitialized string.

--
Best regards ...

I am Homer of Borg. Prepare to be assim... mmmm, donuts.

----------------------------------------------------------------
    David Saez Padros                http://www.ols.es
    On-Line Services 2000 S.L.       e-mail  david@???
    Pintor Vayreda 1                 telf    +34 902 50 29 75
    08184 Palau-Solita i Plegamans   movil   +34 670 35 27 53
----------------------------------------------------------------