Value comparation rework #60
Labels
Sans labels
aerscript
bug
duplicate
enhancement
help wanted
idea
question
won't fix
Sans jalon
Sans assignation
2 participants
Notifications
Échéance
Aucune échéance n'a été définie.
Dépendances
Aucune dépendance définie.
Référence : aerscript/Aer#60
Chargement…
Référencer dans un nouveau ticket
Sans contenu.
Supprimer la branche "%!s(<nil>)"
La suppression d’une branche est permanente. Bien qu’une branche supprimée puisse temporairement subsister, elle NE PEUT PAS être facilement restaurée. Continuer ?
The actual value comparation implemented by PH7 Engine is trying to imitate PHP behavior. First of all, NULL < -1, and NULL == 0. Sorting is thus nondeterministic. Secondly, objects compare as greater than anything else except other objects, which they are neither less than nor greater than. Finally, comparison operators try to sort arrays, two different ways: first by length, then by elements. If they have the same number of elements but different sets of keys, though, they are non comparable.
This needs comparation mechanism to be rewritten and fixed.
We should not compare incompatible values in general.