U+1F914 🤔@lemmy.world to Rust@programming.devEnglish · 17 days agoCall for testing: Restricting trait implementability and field mutability | Inside Rust Blogblog.rust-lang.orgexternal-linkmessage-square3linkfedilinkarrow-up126arrow-down10cross-posted to: lobsters@lemmy.bestiver.se
arrow-up126arrow-down1external-linkCall for testing: Restricting trait implementability and field mutability | Inside Rust Blogblog.rust-lang.orgU+1F914 🤔@lemmy.world to Rust@programming.devEnglish · 17 days agomessage-square3linkfedilinkcross-posted to: lobsters@lemmy.bestiver.se
minus-squarenialv7@lemmy.worldlinkfedilinkarrow-up5arrow-down1·17 days agoSo basically language support for sealed traits and reducing need for getter functions. Kinda neat but not that significant.
minus-squareBB_C@programming.devlinkfedilinkarrow-up2·16 days agoYes and no. And you clearly missed the enums part.
minus-squareKillTheMule@programming.devlinkfedilinkarrow-up2·15 days agoAs mentioned in the article, it enables scenarios that getters/setters can’t because of the borrow checker.
So basically language support for sealed traits and reducing need for getter functions. Kinda neat but not that significant.
Yes and no.
And you clearly missed the enums part.
As mentioned in the article, it enables scenarios that getters/setters can’t because of the borrow checker.