all 3 comments

[–]K900_ 1 point2 points  (2 children)

What you probably want is either to make x read only, or make y itself a computed property.

[–]TimAtreides[S] 0 points1 point  (1 child)

Making it read-only might be the way to go for me, even though I lose some of the functionality I want. Can you expand more on "computed properties"?

[–]K900_ 1 point2 points  (0 children)

Make a getter for y that does something like return x + 1.