Struct Fields – Another Place Where var Feels Out of Place

I think in the context of Mojo one would not call this a “variable” but a “value binding”. In this case it is a “read-only reference”.

Declaring a “value binding” in mojo can be done with a variable (var) or a reference (read, mut or ref) convention. Variables always own the value while references never own the value.

comptime can be used to declare a compile-time value binding.

But I agree that in the context of struct instance variable declarations var is somehow redundant and could be omitted as the default value binding convention. I personally still would keep it as it is explicit in its meaning.

BTW: In Mojo name is even not called a "parameter“ but an “argument”. But this is a controversial topic on its own already :wink:: Feedback request: Should Mojo adopt "specialization" for what we currently call "parameters"?