Q:

Declaring, but not defining F# classes

Is there a way in F# to declare a class, but not define it like in C# or C++ or Java, or pretty much any other language, so that we can avoid the use of the and keyword? I have two fairly big classes that reference eachother, and I don't want to put them both in the same file like this:
type Type1 =
    // definitions

and Type2 =
    //definitions

A:

F# doesn't make it any easier to have circular references than that. I am bit confused by your statement that C# and Java allow you to "declare but not define" a class; these languages have no concept of forward declaration like C++ does, and the only reason C++ has that is to support its header/translation unit-based compilation model, which C# and Java thankfully don't have.
Anyway. To go further I suggest you read Cyclic dependencies are evil and perhaps factor out a common top-level type for your 2 classes so they don't need to reference each other. F# allows circular references, but try not to work against the language.

