I think you're describing Properties, but the syntax is a bit off. Instead of function someFunction, it'd be property someProperty.
The value in the set is implicit - it's what gets passed when you say object.someProperty = x; (x is the passed value).
It's cleaner than Java's getProperty, setProperty IMHO.
|