Skip to content

The comparison rule for array and list are different #10833

@xp44mm

Description

@xp44mm

arrays and lists have different comparison rules, I prefer list comparison rules, why their comparison rules are different, I always thought they were the same. Maybe it's not an bug, it's a feature.

Repro steps

Here's the same data, saved in an array and placed in a set. The another is saved with a list and placed in set.

// this is order for list, top smallest
let ls = set [
    ["";"a"];
    ["a"];
    ]

// this is order for array, top smallest
let ar = set [
    [|"a"|];
    [|"";"a"|];
    ]

Expected behavior

The comparison rule for array should be the same as comparison rule for list. Because arrays and lists logically represent the same data structure, they are sequences of data elements, and they should behave the same way.

Actual behavior

The comparison rule for array and list are different

Known workarounds

Replace the array with a list When using the comparison feature

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions