This little feature is actually one of the reasons why I love the language. It wasn't hard for me to get used to at all, and I've spent my whole life in JavaScript.
First of all, since you can guaruntee type correctness at compile time, the === operator becomes pointless anyway. You probably won't compare an i32 with a Vec3 ever, thus, all the benefits of using this strict equality operator are gone.
Not every feature in the Javascript specification can be ported because the nature of Web Assembly makes things complicated. Also, being able to program your own equality comparison using the @operator("==") syntax makes it all worth it.
Just like everything else in life, some things take time and practice.
This little feature is actually one of the reasons why I love the language. It wasn't hard for me to get used to at all, and I've spent my whole life in JavaScript.
First of all, since you can guaruntee type correctness at compile time, the
===
operator becomes pointless anyway. You probably won't compare ani32
with aVec3
ever, thus, all the benefits of using this strict equality operator are gone.Not every feature in the Javascript specification can be ported because the nature of Web Assembly makes things complicated. Also, being able to program your own equality comparison using the
@operator("==")
syntax makes it all worth it.Just like everything else in life, some things take time and practice.
Yup, software design is all about tradeoffs.