Hello. Is there a way (contracts?), or will there ever be a way to do the following?
- mark a function as side-effect-free, so that the compiler can warn if we call the function and do nothing with what it returns?
- mark a class (I’m thinking of a JPA entity here) as only usable in a single thread, so that instance variables which have been checked as not null do not need to be used with
?.
or
!!
Sorry if that has been asked before. It’s been a long time I haven’t been here 🙂