Ichoran
Anyway, point being that all lazy vals have a bit of performance overhead, local and nonlocal. Hand-coding will generally be better if you can keep everything on the stack.
viktorklang Oct 12 19:32
IMHO lazy val should be non-thread safe and @volatile lazy val should be thread safe...
Ichoran Oct 12 19:40
@viktorklang - Yeah, that'd be nice. Or at least allow a @nonvolatile annotation to opt-in to the thread-unsafe version.
DarkDimius 10:40
IMHO lazy val should be non-thread safe and @volatile lazy val should be thread safe...
this is the current state in Dotty for non-local lazy vals