<<< Date Index >>>     <<< Thread Index >>>

Re: hcache broken (slightly)



Hi,

* Thomas Glanzmann [06-07-12 16:03:34 +0200] wrote:

I don't prefer black over whitelisting or vice versa. I prefer
readiblity and ease of maintenance over duplicate code and bad habits.

* Thomas Glanzmann [06-07-12 15:53:48 +0200] wrote:
> [ assert ]
Since I think we need this feature of updating, isn't abort a bit
harsh?

No, no, no. Because consumers see that something is obvious wrong. They
can fix it (remove the asserts and implement the dump/restore function
or modify the caller so that only the header is cached) and try again.

I agree with the ease of maintaince, and so I proposed doing invalidation in hcache.c once in a central place. That hcache wasn't designed to do something doesn't mean it cannot be changed. :)

If the caller was responsible, it at least should get told that the data given to hcache functions is invalid so that it has a chance to modify. With abort() there's no way to take action.

  bye, Rocco
--
:wq!