Re: [exim] More integer annoyances in 4.65

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Marc Perkel
Data:  
Para: David Saez Padros
CC: exim-users, Tom Kistner
Assunto: Re: [exim] More integer annoyances in 4.65


David Saez Padros wrote:
>
> 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.

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