Why keyword `struct` is used instead of `type` for type definition?

basically the word “type” is used everywhere in docs and function names like typeof(). So, why use the keyword struct but not type in type definition??

What’s now mutable struct used to be type. And what is now struct used to be immutable.

13 Likes

There are many types of types (struct, mutable struct, abstract, primitive, union), only some of which are structs, so it would be misleading to use type to describe structs.

7 Likes

Also, struct is an established name for this purpose, especially in the ‘C family’ of languages.

2 Likes