(see also RFC#0008)
Currently, constants are implemented as final statics. However, it may make sense to actually distinguish this. For example, we could have:
constant int x = 1
static int y = 2
final static int z = 3
Its not clear to me what the value of a final static would be. However, the key difference is that constants would not be inlined, and would not be usable in certain contexts. Observe that this distinction follows Rust.
(see also RFC#0008)
Currently, constants are implemented as
finalstatics. However, it may make sense to actually distinguish this. For example, we could have:Its not clear to me what the value of a final static would be. However, the key difference is that constants would not be inlined, and would not be usable in certain contexts. Observe that this distinction follows Rust.