defis not an expression
val x = def ...?
() => Ais a good candidate?
defis enough to ensure referential transparency, which it isn't
def + by nameis, and in that model
valis the equivalent of
IO[A] = () => A, which has the limitations outlined above
def t: Awith
val t: () => A)
Idand in code using
IO, and see how they differ (because the latter takes great care to satisfy various laws under a broad range of operational conditions, and the former doesn't).