CodyIT@programming.dev to Programming@programming.devEnglish · 17 hours agoOOP is not that badosa1.netexternal-linkmessage-square41fedilinkarrow-up137arrow-down15cross-posted to: lobsters
arrow-up132arrow-down1external-linkOOP is not that badosa1.netCodyIT@programming.dev to Programming@programming.devEnglish · 17 hours agomessage-square41fedilinkcross-posted to: lobsters
minus-squarelolcatnip@reddthat.comlinkfedilinkEnglisharrow-up6·10 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-squarenous@programming.devlinkfedilinkEnglisharrow-up2·8 hours agoHow do C and C++ try to restrict mutability?
minus-squarelolcatnip@reddthat.comlinkfedilinkEnglisharrow-up3·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.