OOP is not that badosa1.net CodyIT ( @CodiUnicorn@programming.dev ) Programming@programming.devEnglish • 17 hours ago message-square34fedilinkarrow-up121
arrow-up121external-linkOOP is not that badosa1.net CodyIT ( @CodiUnicorn@programming.dev ) Programming@programming.devEnglish • 17 hours ago message-square34fedilink
minus-square lolcatnip ( @lolcatnip@reddthat.com ) linkfedilinkEnglish4•9 hours agoTo be fair, that’s an issue in almost every imperative language and even some functional languages. Rust, C, and C++ are the only imperative languages I know of that make a serious effort to restrict mutability.
minus-square nous ( @nous@programming.dev ) linkfedilinkEnglish1•8 hours agoHow do C and C++ try to restrict mutability?
minus-square lolcatnip ( @lolcatnip@reddthat.com ) linkfedilinkEnglish2•edit-27 hours agoconst They don’t do it well, but an attempt was made.
To be fair, that’s an issue in almost every imperative language and even some functional languages. Rust, C, and C++ are the only imperative languages I know of that make a serious effort to restrict mutability.
How do C and C++ try to restrict mutability?
const
They don’t do it well, but an attempt was made.