#60 Value comparation rework

Öppen
öppnade 10 månader sedan av belliash · 1 kommentarer

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 lade till etiketten
bug
10 månader sedan
belliash lade till etiketten
aerscript
10 månader sedan
likoski kommenterad 10 månader sedan
Ägare

We should not compare incompatible values in general.

We should not compare incompatible values in general.
Logga in för att delta i denna konversation.
Ingen Milsten
Ingen tilldelad
2 Deltagare
Notiser
Förfallodatum

Inget förfallodatum satt.

Beroenden

Det här ärendet har för närvarande inga beroenden.

Laddar…
Det finns inget innehåll än.