[Interest] Qt 5.5.0 Compile Time Hash Example

md at rpzdesign.com md at rpzdesign.com
Mon Aug 24 14:16:55 CEST 2015


Andre & Helmut:

Thank you for your comments.

Would you be interested in sharing your solution
to the switch(STRING) problem?

md


On 8/24/2015 6:11 AM, André Somers wrote:
> Op 24-8-2015 om 14:07 schreef md at rpzdesign.com:
>> Helmut:
>>
>> Yes, but you are talking about a different use case
>> with algorithmic purity.
>>
>> We do not care about every string.
>>
>> We only care about the strings in our program.
>>
>> For quality assurance, you can scan the source code looking for every
>> instance of the fnhash("STRING") and make sure there are no collisions
>> project wide.
>>
>> But the gains in code readability should not be overlooked.
>>
>> This is for programmer sanity, run-time cleanliness, switch efficiency, etc.
>>
>> Collisions in any case are VERY low probability.
>>
>> Have a great day!
> But the one case that you _do_ get, will be one heck of a pain to debug...
>
> André
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>

-- 
No spell checkers were harmed during the creation of this message.



More information about the Interest mailing list