I believe you are right Oriol, that is is not easy to generalize. However I think that there is a definite need for something like this and we can come to a general conclusion that will work for most instances. It is hard to get a lot of people to come to a conclusion on what should or should not be the right method. People can find reasons to argue one way or another. In the end, it should come down to what the majority of people feel is appropriate. An example of this would be the argument of which properties the for in loop should take into count. I could see people arguing for and against using inherited properties or not.
As Alexander mentions I can see the majority of use cases would be simple string keys and values. However, I believe we should make the function robust enough to handle nested data types. We could go the route of stringifing the objects and then comparing (which would be quicker) than a recursion function. However as mentioned, will cause problems with types. Another option would be to add a parameter that determines whether inherited properties are taken into count or not. As far as getters, symbols, and proxies go, I think there can be viable work rounds for those cases. I understand that this might make things more complicated but just because something is complicated, it doesn't mean that we shouldn't create it.
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

