Re:Public/protected/private is an unnecessary feature
by throwaway2037 on Friday June 20, 2025 @01:00AM
(#44324873)
Can't you do the same in C++ using struct offsets and reinterpret_cast<>? I'm not sure what you are saying here.
[ Parent
| on HN ]
Re:Public/protected/private is an unnecessary feature
by NeutralForest on Friday June 20, 2025 @03:34AM
(#44325494)
I'm not familiar with C++ enough to know about circumventing `private` but in Python you can access "private" members just like any other "public" ones, with the dot notation. There's no specific enforcement at the language level, no error will be thrown.
Re:Public/protected/private is an unnecessary feature
by colejohnson66 on Friday June 20, 2025 @08:29AM
(#44327049)
Something something undefined behavior