These are chat archives for Microsoft/visualfsharp

8th
Sep 2016
janni2
@janni2
Sep 08 2016 12:13
I currently try to write an interface in F# for C#. I'm doing a syntax-tree, where the root has static methods to move a cursor, which is a reference to one of the nodes. Now I found a "funny" point when trying to annotate an abstract class with "ReferenceEquality"-Attribute: "Only record, union, exception and struct types may be augmented with "ReferenceEquality", "StructuralEquality", "StructuralComparison" ... nice one, but why are classes excluded :-|
janni2
@janni2
Sep 08 2016 13:46
Probably ReferenceEquality is default, but why "obvious"/"redundant" attributes leading to a compile error then.
I have also a little bit of trouble regarding visibility of the class hierarchy. I have an interface, where a method could be "protected" from the outer world as well as abstract classes in the middle of the hierarchy that I don't need to expose to the outer side, but they have to be visible. Not sure if this is necessary.