Hello Duncan !  

I saw a very good point on your suggestion !  

I'll use it when writing/refactoring code.  

Thanks a lot !  

?  
>  Wed Dec 30 2015 11:51:54 pm CET CET from "Darren Duncan"
><darren at darrenduncan.net>  Subject: Re: [sqlite] Magic number in sqlite
>source code
>
>  On 2015-12-30 12:51 PM, Richard Hipp wrote:
>  
>>On 12/30/15, Richard Hipp <drh at sqlite.org> wrote:
>>  
>>>I'll continue look for an alternative way to make the intent of the
>>> code clearer.
>>> 

>>  See https://www.sqlite.org/src/info/1541607d458069f5 for another
>> attempt at removing magic numbers. But I don't like it It seems to
>> complicate more than it clarifies. My current thinking is that the
>> code should remain as it is on trunk.....
>> 

>  While kludgy itself, a possible compromise is to still use a named
>constant / 
> macro but have '4' in the name of the macro, eg like 'SOME_FOO_4' where the
>
> SOME_FOO is a semblance of descriptive and the 4 says what the value is so
>you 
> don't have to look it up. The key thing is that there may be multiple
>reasons 
> to use the value 4 in a program and the named constant is illustrating
>which 
> reason it is. If you change the value of the constant then you would also 
> rename this particular constant to match the new value, but the key thing
>is you 
> have something easily look-upable that shows all the 4 are connected. --
>Darren 
> Duncan
> 
> _______________________________________________
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> 
>
>  



?

Reply via email to