Details
-
Sub-task
-
Status: Resolved
-
Major
-
Resolution: Won't Fix
-
0.8.0
-
None
-
None
Description
We just agreed on a new convention for getter/setter APIs. It will be good to refactor code to conform to that.
> We can actually go with public vals or vars - there is not much point in
> defining a custom getter/setter as that is redundant.
>
> For example:
> - start with "val x"
> - over time, we determine that it needs to be mutable - change it to "var
> x"
> - if you need something more custom (e.g., enforce constraints on the
> values that you can assign) then we can add the custom setter
> private[this] var underyling: T = ...
> def x = underlying
> def x_=(update: T) { if (constraint satisfied)
> else
{throw new Exception} }
>
> All of the above changes will be binary compatible since under the covers,
> reads/assignments are all through getter/setter methods.