tag:blogger.com,1999:blog-786436404237631186.post8133221066704062799..comments2023-09-17T00:27:35.242-07:00Comments on ndebug: Pimples are annoying, C++ Clearasil wantedMax Burkehttp://www.blogger.com/profile/13292260677257504654noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-786436404237631186.post-14035991275604588812010-11-02T01:08:32.405-07:002010-11-02T01:08:32.405-07:00If I recall modula-3 could do this, you would impl...If I recall modula-3 could do this, you would implement a module and then expose it through several different interfaces. The details are hazy though (17 years ago), and at the time I did not wonder what the internal implementation was like, whether this mechanism was able to statically bind everything or if it had to resort to late binding.<br /><br />Best way is not to have too many internal details so that exposing them isn't a big deal! I know, easy to say, most code bases end up with lots of state in the classes.<br /><br />I think that if we mostly concern ourselves with data and operations, the operation can be a minimalistic interface and the data not known outside of the operation(s) (but intimately known within it). Not all code is easy to express that way...stinghttps://www.blogger.com/profile/06445059935041012229noreply@blogger.comtag:blogger.com,1999:blog-786436404237631186.post-30612576824802140832010-11-01T13:52:23.600-07:002010-11-01T13:52:23.600-07:00Agreed, this is a serious weakness in C++ and some...Agreed, this is a serious weakness in C++ and something that makes C-style interface in some cases so much faster, cleaner & more secure. <br /><br />Although having the C++ access syntax would definitely be preferable, just don't want everyone to build and see my dirty internal details. Nor have to rebuild all code using my class when I change internals.<br /><br />Not a fan of all the copy'n'paste pImpl requires eitherrepihttps://www.blogger.com/profile/03696561096253736133noreply@blogger.com