Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a module of efficient non-structural equality/comparison operators #281

Open
baronfel opened this issue Oct 14, 2016 · 0 comments
Open

Comments

@baronfel
Copy link
Owner

Add a module of efficient non-structural equality/comparison operators [6098490]

Submitted by fsharporg-lang on 6/25/2014 12:00:00 AM
21 votes on UserVoice prior to migration

In F# 3.x uses of =, <>, <, >, <=, >=, compare, max and min use “structural equality and comparison”. This is the right default for a functional data-oriented language.
However, this gives rise to problems because
(a) the .NET op_Equality, op_LessThan and other corresponding static methods are not easily accessible from F#.
(b) the use of F#'s structural equality and comparison can be slow for user-defined value types.
In F# 4.0, it is reasonable to add a module NonStructuralOperators to FSharp.Core which gives an implementation of non-structural equality/comparison operators. Opening this module will ensure these operators are used within that scope, similar to the “Checked” module.

Response

** by fslang-admin on 1/21/2015 12:00:00 AM **

Completed for F# 4.0, See https://visualfsharp.codeplex.com/SourceControl/network/forks/dsyme/cleanup/contribution/7675
Don Syme, F# Language/Library Evolution

Original UserVoice Submission
Archived Uservoice Comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant