←back to thread

78 points p2detar | 1 comments | | HN request time: 0.2s | source
1. 1718627440 ◴[] No.46216652[source]
> One of the flaws with pure encapsulation is that you can see a drop in performance. Having a bunch of functions to get inner members of a structure also blocks the compiler from optimizing it’s best.

Why can't you just use an optimizing compiler? Trading casting const away, doesn't seem right to me.