#60 Value comparation rework

開啟中
belliash10 月之前建立 · 1 條評論

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 added the
bug
label 10 月之前
belliash added the
aerscript
label 10 月之前
likoski 評論 10 月之前
所有者

We should not compare incompatible values in general.

We should not compare incompatible values in general.
登入 才能加入這對話。
未選擇里程碑
No Assignees
2 參與者
訊息
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
尚未有任何內容