Skip to content

Node identity: === and hash redesign (planned for v0.5) #83

Description

@mathieu17g

Node is an immutable struct, so === is structural: two value-identical siblings (<item/><item/>) are === each other. Consequences today: unique/Dict/Set over nodes misbehave (#55), and parent/depth/siblings/xpath-.. can be ambiguous on value-identical siblings (documented in the migration guide's known limitations).

v0.5 will redesign node identity with consistent hash, aligned with FlatNode's positional identity (store + index) so the semantics carry forward unchanged if the flat store ever backs Node. This is a breaking change for code relying on the current structural ===; it will ship with migration notes.

If your package compares, deduplicates, or keys collections on Nodes, feedback on your expectations is welcome.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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