2 ms·
upvoted, but I think you meant "that's NOT true for Scala" (for the reasons you mentioned). Also, it should be clarified that `val` in Scala gets evaluated onl
by the_af 9y ago
upvoted, but I think you meant "that's NOT true for Scala" (for the reasons you mentioned).
Also, it should be clarified that `val` in Scala gets evaluated only once, which is why it cannot return different things at different times, unlike `def`.