top | item 41633494

(no title)

pjtr | 1 year ago

This seems fine within a file, but isn't this problematic across files? Now the file order is significant, so not only is the Visual Studio XML project file is an essential part of the language semantics, you also can't organize your files in subdirectories freely? Or did they fix that at some point? How does that scale to larger projects?

discuss

order

neonsunset|1 year ago

More expressive nature of F# means you don't have that many files. C# is luckily and finally moving into that direction too. There was no reason for "one file per class" policy anyway, but it was still widely adopted historically.

Here's an example of a worst-case scenario (GUI frameworks and the extensions have notoriously huge amount of code): https://github.com/fsprojects/Avalonia.FuncUI/blob/master/sr...

But realistically an average project would look closer to this instead: https://github.com/DiffSharp/DiffSharp/blob/dev/src/DiffShar...

Once you have enough files, it might be a good idea to factor out separate concerns into different projects.

fire_lake|1 year ago

You can organize the files however you like, but you must specify list them in the correct order.

The XML is not part of the language. You could invoke FSC manually (again, with the files listed in the correct order).

It scales very well IME.

Would C# be better with circular library dependencies?