The `mut` keyword in variable declaration

Agree. There are many use cases where you might want something to stay constant which is only known at runtime like the current time, a user input or the return value of any function that can only be calculated at runtime.

There were some discussions on this in the forum and on discord too and there is already a way to achieve a "runtime constant“ in Mojo but this has to be implemented separately as Mojo and the stdlib do not provide it out of the box.

fn readonly[o: ImmutOrigin, T: AnyType](ref [o] val: T) -> ref [o] T:
    return val

fn main():
    ref start_time = readonly(get_current_time())
    ...

See The case for explicit `read` variable bindings too.

One easy straight forward solution would be to provide this function in the stdlib and add a description to it (e.g “Get an immutable reference to a runtime value. Prefer comptime for values that are known at compilation time”). So anyone asking for a “runtime constant” can be pointed to this function. It would avoid code fragmentation too. If this function gets used in many places It would be possible to provide some syntactic sugar for it in Mojo 1.x.