Open koraa opened 5 years ago
Sure, feel free to take it! Thanks for taking interest in this project!
Ferrum provides a few standard traits in the stdtraits.js file; most notably eq
for content based comparisons. Most languages provide such a trait as an overloadable part of their standard lib (.equals in Java, eq in python, operator ==()
in C++…similar traits exist in rust & haskell). Js provides ===
(value based comparison) and libraries like lodash provide content based comparison for a limited number of types (meaning it may not work for custom types).
The eq trait in ferrum is extensible for custom traits.
A short introduction to the standard traits provided by this lib and an explanation why a trait/overloadable approach is superior should be added to the readme.
@koraa Can I know more about this issue?