Klemens Nanni <[email protected]> wrote: > On Fri, Aug 05, 2022 at 05:08:14PM +0200, Claudio Jeker wrote: > > We added the inline functions for these typecasts to add a minimal level > > of error protection. Now where do we hit const problems? I have not seen > > such issues and I wonder if those just come from overzealous use of const > > arguments to functions. > > const problems quickly appear if we constify function arguments, which > does not strike me as overzealous when it documents the functions > behaviour, helps spotting side effects should for example future changes > suddenly make it write to pointer arguments, etc.
But how often does that actually happen, so is it really that hugely valuable, compared to the expense of bizzare abstration in a .h file somewhere, which increases the knowlege required to work in this area, thereby also decreasing the developers who will work in the area? If you drive them down to zero, there will be no future changes you are scared of...
