Primitive Queue<any T> considerations
John Rose
john.r.rose at oracle.com
Thu Nov 19 04:28:21 UTC 2015
On Nov 18, 2015, at 6:18 PM, Vitaly Davidovich <vitalyd at gmail.com> wrote:
>
> Also, you can have "lost" writes even with immutable types, e.g.:
>
> MyMutableInt x = new ...
> x.add(...); oops forgot to assign to new local
>
*That* needs a linty language feature:
interface ImmList<T> {
@Unavoidable // do not discard this value without a complaint
ImmList<T> add(T);
}
More information about the valhalla-dev
mailing list