You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The {{sets}} module provides an {{is_set/1}} function that other modules can employ to check a term is a set or not, without violating the opacity of the underlying representation.
`Similar' stdlib modules that define opaque ADTs (e.g., {{dict}} and perhaps others – I have not checked all) currently do not provide such functions.
The suggestion/request of this issue is that they do in 23.x onwards.
The text was updated successfully, but these errors were encountered:
We will not add such functionality this late to OTP 23.
It is not immediately obvious why such functions are useful, so if you want us to consider them for OTP 24 we will need a motivation and the intended use cases. It also not clear whether those functions should give fast, heuristic answers or a slow, thorough answers, or perhaps the choice of both. Of the current functions, ordsets:is_set/1 traverses the entire set before answering true, while sets:is_set/1 only test for the #set{} record. gb_sets:is_set/1 only tests the top-level term.
Original reporter:
kostis
Affected version:
Not Specified
Component:
stdlib
Migrated from: https://bugs.erlang.org/browse/ERL-1210
The text was updated successfully, but these errors were encountered: