3 ms·
Why not val/mut? Or const/mut, const/var.
by R0b0t1 4y ago
Why not val/mut? Or const/mut, const/var.
- V-2 4y agoconst is already a keyword - it denotes compile-time constants (basically primitive types). val is constant in runtime, but it can still be computed on the fly; just assigned only once. mut is a nice proposition, I'd certainly consider it if I were to design Kotlin
- R0b0t1 4y agoInteresting. Why not simply overload the meaning of const based on rvalue?