Git Product home page Git Product logo

Comments (4)

En3Tho avatar En3Tho commented on September 23, 2024 1

@alexandrehtrb Please do not forget that in C# order of files does not matter while in F# it does. So by specifying files in fsproj you're not only including those into compilation, you're also indicating compiler which file ordering is proper/expected.

from fsharp.

vzarytovskii avatar vzarytovskii commented on September 23, 2024

Hey, @alexandrehtrb.

Currently, this is the design of the compiler and language, requirement even.

There are no current plans to change that, as it will require a major compiler and typechecker architecture change (and will likely be major performance hit).

We might reevaluate it in future.

from fsharp.

smoothdeveloper avatar smoothdeveloper commented on September 23, 2024

Welcome @alexandrehtrb, you may be interested by this article:

https://fsharpforfunandprofit.com/posts/recipe-part3/

and other things that mandate it remains the same, or at least, make it less practical, to envision a world where F# does not have mandatory file ordering; for the time being.

I don't think it is a blocker for people doing C# to learn F#; with this rhetoric, we can create infinity of good reasons not to learn/use F# (goes same for C#, etc.).

Everyone goes over the hump, I also was irked a bit, but it was due to pre conditionning of 1 class per file for so many years.

I live happier with less files, shorter lines, more expressive and correct code, and code having topological and semantical ordering.

You may read on fsharp/fslang-suggestions#309 (comment) and discuss suggestions to extend F# in relation to what you are bringing.

from fsharp.

Martin521 avatar Martin521 commented on September 23, 2024

If you are using Visual Studio, when you add a new .fs file, it is automatically added to the project's .fsproj. However, if you are using other editors like VS Code, it isn't, and without adding to fsproj, it won't get compiled.

In VS Code / Ionide, you have a context menu in the solution explorer where you can "Add file above" / "Add file below". These commands automatically update the fsproj file.

from fsharp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.