Re:Kent Beck: “I get paid for code that works, not for tests...
by johncolanduoni on Thursday December 08, 2016 @12:44PM
(#13132244)
I think the linearity can force you to streamline things, but personally I often have to resist the urge to bike-shed the order in which I write functions in the same file, let alone what order I want to put my files in. I end up being torn between different orders I would want in different situations, and would love a language or IDE that would let me view definitions in different orders depending on what I'm looking for.
If you do need to get around it though, you can have mutually referential types in F# if you use the "and" keyword (although the definitions of the types have to be right next to one another). And in the next update to F# you'll be able to have mutually referential types and modules within the same file which is often good enough for most other things you might need that sort of thing for.[1]
[1] https://blogs.msdn.microsoft.com/dotnet/2016/07/25/a-peek-in...