CodyIT@programming.dev to Programming@programming.devEnglish · 1 day agoOOP is not that badosa1.netexternal-linkmessage-square42fedilinkarrow-up142arrow-down17
arrow-up135arrow-down1external-linkOOP is not that badosa1.netCodyIT@programming.dev to Programming@programming.devEnglish · 1 day agomessage-square42fedilink
minus-squarelolcatnip@reddthat.comlinkfedilinkEnglisharrow-up9·1 day 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-up4·23 hours agoHow do C and C++ try to restrict mutability?
minus-squarelolcatnip@reddthat.comlinkfedilinkEnglisharrow-up8·edit-222 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.