baronfel / fsharp-lang-testbed

0 stars 0 forks source link

Allow all declarations to be mutually referential and the compiler takes files in any order #10

Open baronfel opened 7 years ago

baronfel commented 7 years ago

Idea 10276974: Allow all declarations to be mutually referential and the compiler takes files in any order

Status : open

Submitted by Kevin Ransom on 10/19/2015 12:00:00 AM

39 votes

With F# becoming more and more multi-editor and cross-platform, it is becoming increasingly difficult to teach all build/edit tools about F#'s file order. The F# community are currently struggling to "update" each new build/edit tool to understand that F# actually needs a file order. Part of the problem is that there is no standard textual way to specify this file order except as command line arguments, and these are not stored in an editable form. There is no standard way to specify the F# file order. We need an (optional) solution to this problem that is closer to home and doesn't involve modifying build/edit tools. This proposal is one of three alternatives to deal with this problem in the F# language/compiler itself. The specific proposal covered by this UV entry is to just change F# to use no file order at all, allowing all declarations in an assembly to be mutually referential with other declarations. Related alternative: Keep a file order, but infer it from #load/#require declarations. This is covered by /ideas/suggestion-6323146-syntactically-describe-dependencies-between-files Related alternative: Keep a file order, but optionally have it specified by a fileorder.fsx or fileorder.txt or fileorder.json: /ideas/suggestion-13394442-optionally-specify-file-order-by-a-fileorder-fsx