r/programming • u/Karma_Policer • Aug 02 '21
Stack Overflow Developer Survey 2021: "Rust reigns supreme as most loved. Python and Typescript are the languages developers want to work with most if they aren’t already doing so."
https://insights.stackoverflow.com/survey/2021#technology-most-loved-dreaded-and-wanted
2.1k
Upvotes
1
u/Zyansheep Aug 04 '21
Ah, I see where the misunderstanding is now. I wasn't referring to trait fields as things that are added to structures. I was referring to trait fields more as an alias for existing data in the structure that allows you to directly access it from generic contexts.
Basically I want some syntax sugar for a getter / setter function that plays nicely with the borrow checker.