[rust-dev] Getter and setters
bruant.d at gmail.com
Sun Jul 22 04:15:25 PDT 2012
Le 22/07/2012 12:56, Matthieu Monrocq a écrit :
> It sounds to me like /properties/ =>
> /A *property*, in some object-oriented
> <http://en.wikipedia.org/wiki/Object-oriented_programming> programming
> languages <http://en.wikipedia.org/wiki/Programming_language>, is a
> special sort of class
> <http://en.wikipedia.org/wiki/Class_%28computer_science%29> member,
> intermediate between a field
> <http://en.wikipedia.org/wiki/Field_%28computer_science%29> (or data
> member <http://en.wikipedia.org/wiki/Data_member>) and a method
> Properties are read and written like fields, but property reads and
> writes are (usually) translated to get and set method calls./
> Is this what you wanted to express ?
The definition seems close to what I described indeed :-)
Does Rust already have support for these?
What's missing from the wikipedia page is a pro/con analysis. I've
described pros in my initial message, I'm curious of arguments against
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Rust-dev