Welcome! Please see the About page for a little more info on how this works.

+2 votes
ago in Java Interop by

There are certain java types that are a perfect fit for IDeref - e.g. Optional, ScopedValue, LazyConstant etc. However, since IDeref is not a protocol (like in cljs), we are left with having to ask for this to be added/supported (e.g. this) every time. I guess my question is whether it is at all feasible to have IDeref be a protocol, and if not, what are the plans (if any) for supporting deref on these types?

Many thanks in advance...

1 Answer

+1 vote
ago by

Probably tough to make it a protocol now, especially with backward compiled compatibility.

It would be best to vote on the question for Optional to voice your opinion there - we look at higher voted things with more urgency.

ScopedValue is only available non-preview in 25, so pretty new still. would probably be best to file an Ask question specifically about that so it can gather votes.

LazyConstant is not a thing yet, so will be a long while probably.

...