Hacker News new | ask | show | jobs
by ReleaseCandidat 637 days ago
No, it's not just about lexically scoping, but actually about having to have every (yes, some escape hatches exist like "namespace rec" and "module rec") definition before it's usage, which is an implementation detail of the compiler. So you have to order your files correctly when compiling. Which did break sometimes, because MS' build system/project files doesn't care about order, as C# doesn't care.
1 comments

I see. Thanks for correcting me (I'm quite familiar with OCaml but never used F# so this subtle difference between the two eluded me). I wouldn't have imagined this being put as an advantage in terms of robustness and reliability, contrary to lexical scoping and functions actually being closures.