January 2018
Beginner to intermediate
312 pages
7h 22m
English
There’s one last thing you should know. F# has strict rules about the order of declarations. A type higher in a file cannot reference another type further down in a file. And a file earlier in the compilation order cannot reference a file later in the compilation order. This means that when you are coding your types, you have to think about how you organize them.
A standard approach is to put all the domain types in one file, say Types.fs or Domain.fs, and then have the functions that depend on them be put later in the compilation order. If you have a lot of types and you need to split them across multiple files, put the shared ones first and the subdomain-specific ones after. Your file list might look ...
Read now
Unlock full access