Sébastien Doeraene
Sébastien Doeraene
I don't think it's really about #1593. That one is supposed to be a semantics-preserving optimization. Here, IIUC, we would want this to apply even to objects that may have...
We've been wanting to do that for a while, actually. So-called "linker plugins", similar to scalac plugins. We'll probably work on this sometime post-1.0.0, though, based on an even simpler...
@andreaTP That use case is actually quite different from what I associate this issue to. In your case you patch IR at *compile*-time, before putting it in .jars. This does...
That would be hard to write, because you'll have a hard time deciding in which part of the codebase you can apply your optimisations. For example the implementation of the...
Alternative flows that I mentioned off-line during the meeting: * Have `Waiting`, `Evaluating` and `NullValue` all extend a common superclass. Then type-test for that class first. Hopefully that will get...
The problem with that is that you have to actually initialize the field to `Uninitialized` in the constructor. The idea of using `null` is that we get it for free...
You can "early"-initialize it, before calling the super constructor. Before that, no code can possibly refer to it.
Play JSON actually *actively* tests for the presence of the bug: https://github.com/dotty-staging/play-json/blob/f65a409f4dc129f7adc72f048abbfbfc937a740f/play-json/js/src/test/scala-3/play/api/libs/json/EnumSpec.scala#L14-22 What am I supposed to do with that!?
> ```scala > set `play-json`.js / Test / unmanagedSources / excludeFilter := HiddenFileFilter || "EnumSpec.scala"` > ``` > > a little trick I've employed about a million times in the...
> Yep, or at least to me it is. Alright, that worked as well. @dwijnand Would you mind reviewing this PR, perhaps? It's mostly a port of the `Enum`-related aspect...