You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fits capitalization of enum's (treats them as a type)
Fits enum initialization syntax
Treats void type union fields as an enum
Cons:
New special syntax
Union field may be confused with a type ($1)
Extra: const bar = Type.Int { ... } syntax might be confusing
constfoo: Foo= .{
.x=5, // Could be optional, or not
.y=.A {5} // Is clearly a union + tuple
.z=.X// is an enum or void union
};
constbar=Type.Int { // Could be a union or type
.signedness=.signed,
.bits=32,
};
The text was updated successfully, but these errors were encountered:
Current way
Proposed way
Pros:
Cons:
Extra:
const bar = Type.Int { ... }
syntax might be confusingThe text was updated successfully, but these errors were encountered: