refu-lang / refu

Refu language
21 stars 4 forks source link

Type operator associativity #15

Open LefterisJP opened 7 years ago

LefterisJP commented 7 years ago

Many of the type operators should have the associative property.

As an example the sum type: string | i32 is the same as i32 | string and yet the current implementation does not view it as such.

I suppose same goes for product types:

string, i32, bool should be equal or at least convertible (with a warning since memory layout changes?) to any other permutation like: i32, bool, string.