0
6
Fork 0

Value comparation rework #60

Offen
2019-11-02 17:31:48 +01:00 von belliash geöffnet · 1 Kommentar
Besitzer

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.

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.
belliash hat die Labels
bug
aerscript
2019-11-02 17:31:48 +01:00 hinzugefügt
Besitzer

We should not compare incompatible values in general.

We should not compare incompatible values in general.
Anmelden, um an der Diskussion teilzunehmen.
Kein Meilenstein
Niemand zuständig
2 Beteiligte
Nachrichten
Fällig am
Das Fälligkeitsdatum ist ungültig oder außerhalb des zulässigen Bereichs. Bitte verwende das Format „jjjj-mm-tt“.

Kein Fälligkeitsdatum gesetzt.

Abhängigkeiten

Keine Abhängigkeiten gesetzt.

Referenz: aerscript/Aer#60
Keine Beschreibung angegeben.