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
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.
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
The text was updated successfully, but these errors were encountered: