Project

General

Profile

Actions

Feature #16992

open

Sets: officially ordered

Added by marcandre (Marc-Andre Lafortune) over 4 years ago. Updated 8 months ago.

Status:
Assigned
Target version:
-
[ruby-core:98967]

Description

Officially, set elements have uncertain order. This predades when Hash started being ordered (Ruby 1.9.0, Xmas 2007). Sets have since been de-facto insertion-ordered. FYI, in those 13 years, there have been about 70 commits to lib/set.rb.

I have the impression that a non-negligible amount of code in the wild rely on sets being ordered, at least under most circumstances. I feel that this should be officialized.

If sets are truly unordered, then why do we hesitate to make an optimization of & and |: https://bugs.ruby-lang.org/issues/15281

See also: https://bugs.ruby-lang.org/issues/14069


Related issues 1 (1 open0 closed)

Related to Ruby master - Feature #16989: Sets: need ♥️Assignedknu (Akinori MUSHA)Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0