Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to drive F# Adoption - Part 1? #798

Closed
KevinRansom opened this issue Dec 16, 2015 · 127 comments
Closed

How to drive F# Adoption - Part 1? #798

KevinRansom opened this issue Dec 16, 2015 · 127 comments

Comments

@KevinRansom
Copy link
Member

F# is great programming language and yet it is under utilized. I would like to understand what you the enthusiast F# developer believes are the top four things we can do to drive adoption: As a developer I believe they are features, if someone has already suggested your top thing, repeat it in your list anyway.
Please keep discussion to a minimum for this exercise. We can discus the results elsewhere, later. I just want to get a feel for everyone people thinks.

@KevinRansom
Copy link
Member Author

My List:

  • Support for coreclr
  • Much better tooling --- I.e Incorporate Powertools and Compiler Service
  • Templates for Web Programming / Azure
  • Much improved library / extensions / type provider discovery

@jamessdixon
Copy link

UWA (ran into that again this AM - PCL doesn't cut it)
+1 tooling

@rodrigovidal
Copy link

  • Better Folder support (C# devs love folders)
  • Multi-pass compilation. (Most developers are not used to single-pass compilers)
  • +1 for Incorporate Powertools and Compiler service
  • asp.net 5 support

@eiriktsarpalis
Copy link
Member

While C# to F# interop is pretty much flawless, the opposite story has many pain points. For example:

  • F# optional parameters awkward to use from C#.
  • Lacking an easy way to define F# functions in C#.
  • F# extension methods are impossible to use in C#.
  • The ever-present implicit dependency on FSharp.Core.

Often when needing to make F# libraries consumable by C# code, I need to define lackluster C# wrappers that are mostly boilerplate. I think that this weakness may have contributed to some extent to the lack of success that F# libraries have had in the .NET ecosystem, which can in turn reinforce attitudes that F# is really just a toy language.

Other than that, +1 tooling/debugger improvements, +10000 CoreCLR support.

@SabotageAndi
Copy link

+1 tooling
support or better support for different platforms (coreclr, Univeral Apps, Xamarin)

@lefthandedgoat
Copy link

  • Marketing and Evangelism from Microsoft (I can't even tell you the number of times people have told me that they have never heard of F#, including MS employees)
  • coreclr love
  • Slightly better tooling in VS, Resharper support

@jeroldhaas
Copy link

  • F# on linux has much room for improvement. Problems working with older versions of mono, mainly, since a few distros don't keep mono up to date
  • Editor support needs to be on equal ground, with respect to features (Emacs vs Vim vs Code vs VS vs XS...)
  • FSI is painfully behind when compared to other REPLs
    • save / restore session like RStudio
    • "workspace" view like RStudio where bindings can be viewed
    • intellisense / colorization
    • font customization / generall look & feel
  • Project templates need love
  • F# Web projects are very difficult to work with in VS
  • Roslyn and F#?

+1 on macros, compiler extensions

⭐ Perhaps the ability to compile to something other than IL? (F#->JS-AST, LLVM, ELF, MinGW)

@7sharp9
Copy link
Contributor

7sharp9 commented Dec 16, 2015

Add more value to the core language:

  • Add macros to the language
  • Add compiler extensions to the language

@forki
Copy link
Contributor

forki commented Dec 16, 2015

Tbh with the success of powertools and ionide I would vote to get the IDE
tooling completely out of this repo. These two repos show really good
quality and fast release cycles if something goes wrong.
It's also much easier to contribute since everything is in a build script
and there are no hidden internal product builds.
I'd love to see Microsoft contribute to these projects in the future.

There is still lots and lots to do in this repo and coreclr + .NET native +
Azure are things that would belong here and in other MS repos.

But please don't kill the OSS effort of the other projects by taking
control.
On Dec 16, 2015 20:34, "Andreas Willich" [email protected] wrote:

+1 tooling
support or better support for different platforms (coreclr, Univeral Apps,
Xamarin)


Reply to this email directly or view it on GitHub
#798 (comment)
.

@ploeh
Copy link
Contributor

ploeh commented Dec 16, 2015

Here are my thoughts on how to make F# more attractive to 'mainstream' developers. Oh, dear, here we go:

Make F# a first-class .NET language

You may claim that F# is already a first-class .NET language, but it's not, really. IIRC, when you install Visual Studio 2015, you have to actively select F# as one of the optional languages; if you don't select it, it's not even going to be in Visual Studio.

Furthermore, look at how Microsoft talks about .NET and Roslyn: It's C# here, C# there, and then occasionally C# and Visual Basic.

This tendency is clear with the new ASP.NET stack, as well as with Universal Apps.

Outside of the Visual F# team, it seems like F# isn't really on the radar - not even in the rest of DevDiv, and certainly not in the rest of Microsoft.

The (open source) F# community is doing a great job of tooting the F# horn via other channels, but the .NET community (if such a thing exists) as a whole is still largely taking its guidance from Microsoft.

When there's no templates, no samples, no documentation, in Visual Studio, for most .NET developers it doesn't exist.

What's really been puzzling me for a long time is that Microsoft doesn't realize what a gem they're sitting on.

Programmers migrate towards better languages. When Java stagnated, many migrated to Scala (and Clojure). Programming languages matter. Microsoft as a whole sort of realises this: just look at the scramble towards JavaScript.

F# is a unique language offering, because it's the only(?) 'industrial strength' programming language that offers a Hindley-Milner type system.

  • F#: Strongly-typed, Hindley-Milner
  • Scala: Strongly-typed, but not H-M (AFAIK)
  • Clojure: Dynamically typed
  • Erlang: Dynamically typed (I think)

It may not be everyone's cup of tea, but if you want to be 'almost as Functional as Haskell', but can't convince your organisation to take a chance on it, F# is a great choice.

Furthermore, due to the interop with .NET, it's easy to gradually introduce F# into an organisation that already runs .NET.

Better tooling

All that said, better tooling is still needed. As @forki mentions, there's a lot of good to be said about F# Power Tools, but there are also areas where the Visual Studio editor seems too 'primitive' compared to the C# editor.

E.g. it'd feel more modern with

  • Code Lens
  • Peek Definition

I don't know if these can be built with F# Power Tools, but since it hasn't happened yet, I suspect these are some proprietary Visual Studio UIs that are locked down...

Better web tooling support

Web development is still a thing, and if the web development support is poor (e.g. lack of templates), you lose a lot of adoption right there.

ASP.NET vNext isn't making it easier to get started with web development on F#. While I'm aware of alternatives such as Suave (and perhaps Freya), they aren't going to win C# developers over if it looks like it's impossible to create an F# web project in Visual Studio.

Faster compiler

The F# compiler is, unfortunately, slow.

Whenever I'm back in a C# project, I'm surprised at how fast I can compile a much larger code base.

The slow compilation time hurts many development processes, e.g. Red/Green/Refactor, which should be faster than 10 seconds. In my experience, it's impossible to keep the cycle time under 10 seconds on a moderately-sized F# code base, because compilation alone can take 4-6 seconds.

Oh, and while we're talking about compilers, I'd like to downvote 👎 @rodrigovidal's suggestion for a multi-pass compiler (sorry, nothing personal). The single-pass compiler is F#'s most precious asset.

@gsobocinski
Copy link

I have to agree with @lefthandedgoat marketing and evangelism is the key. I'm also interested in Elixir and the way that they are engaging Ruby devs, amongst others, shows us the way F# needs to go.

@sergey-tihon
Copy link
Contributor

  • More love from MS on public events (people should know that F# a first-class .NET language)
  • Better FSI with intelissense + some other features
  • Better tooling (CodeLens & Peek Definition)
  • Folder support in fsproj (Multi-pass compilation or super-intuitive compilation order management with single-pass compilation)
  • Project.json should allow to plug external dependency manager, so Paket should be first-class .NET dependency manager

👍 For FSharp.Core
👎 For CoreCLR

@dsyme
Copy link
Contributor

dsyme commented Dec 16, 2015

Awesome discussion.

Language

  • Progress the language incrementally. I won't discuss that here. (That said, extra language features would make only a relatively small marginal difference in adoption compared to other things.)
  • As an aside, I will mention the need to get the language/compiler bug count right down in this repo. I personally find it hard to do major new rounds of language work when I still see a bug trail. (Separating tooling bugs from language/compiler bugs would help with that, e.g. by putting the IDE tooling in a separate repo. My personal belief is that bug "weight" grows at O(n * log(n)) rather than linearly given the time to search and organize issues.)

Compiler and build

  • Core CLR +1000. Amazing progress here recently and it's so important to be doing this during the phase when we can still get feedback to the CoreCLR design and surface area. Very, very exciting.
  • Keep improving F# compiler performance incrementally.
  • Keep incrementally enabling and improving F#-to-JavaScript compilation (not in this repo, but through WebSharper, FunScript, Compiler Service). In the long term it will only become more important to support some modicum of this in various scenarios.
  • Keep making dependency management simpler and more sound. It was not happy that "Missing Method Exception" should have been so common for so many years with F# - we put a huge amount of work into making the language sound, only to have DLLs and dependency management bite us. I love Paket because it solved this problem most the projects I work on. Roll on Nuget V3 and Paket vNext, and full credit to Steffen for the huge influence he's had here in making the world a better and happier place.
  • Move off MSBuild project files. These just don't cut it for the next generation of hipster programmers.

Visual F# Tools:

  • The default Visual F# Tools are a really big place to make a large difference for driving adoption of F# . Millions of people use Visual Studio every day for Windows programming. They are all potential F# users. Many have tried F# and seen that the default tooling needs serious work. The Visual F# Power Tools are awesome. Every person giving a talk or demo of F# in Visual Studio should mention them and show them. Always.
  • Given the importance of the default tooling for F# adoption, I think we need to consider again integrating the Visual F# Power Tools (VFPT) with Visual F# Tools (VFT). (Tactically, this could either be done in visualfsharp repo, or by making VFPT a complete replacement for VFT, and/or by making a new repo that holds the integrated combination. Microsoft would then ship this combination as the default tooling in Visual Studio. Either a repo managed by Microsoft (like this one) or one co-managed by a highly trusted community member and Microsoft. Quality and performance would need to be prioritised - I'm kind of assuming the absolutely awesome boom in VFPT functionality plateaus a bit)
  • Start an initiative for better F# Interactive tooling in Visual Studio. Probably as a sister repo to this one initially, co-run by a Microsoft engineer and with some Microsoft PM oversight, but with a clear path to convergence & integration into VFT.

Upstack frameworks and tools (Web, Cloud, Client, Data, Data Science, Build, Test, ...)

  • I'm a huge believer that the biggest area by which to drive more adoption is through better and greater "upstack" frameworks, meaning for web, cloud, client, data, data science, build, test etc.. People flock to languages with frameworks that suit a need and a purpose. F# has come a long way recently (e.g. Suave, MBrace, FsLab, FAKE, FsCheck and many more - sorry not to list your favourite). Supporting and growing a really compelling set of upstack technologies is crucial. Likewise, support in more canonical .NET frameworks is even more crucial too.

@rodrigovidal
Copy link

@ploeh Hey Mark, I really like F# single-pass compiler, I do know it's value. But I really think that it's something that harm's adoption.

As far as I undestand, Kevin asked about what could drive adoption, not what I would like F# to be. (That would be lots of language features like typeclasses but it wouldn't drive adoption). F# is the only language I know that has this feature, and it's very annoying when you are a beginner. That's one of the main complaint I have been listening from C# developers over years.

Maybe I'm wrong. :)

@lefthandedgoat
Copy link

I also think you need 2 strategies for 2 different types of developers. Two is probably an oversimplification.

Group 1 is the current .Net and C# developer. They need MS to give blessing. Its pretty much as simple as that.

Group 2 is the non MS Stack developer, data scientist, academics, and young people. For that you need awesome *nix experience.

@forki
Copy link
Contributor

forki commented Dec 16, 2015

@mark I know what you mean with the Web remarks, but suave.io is working
really nicely inside of VS. There is just no asp.net vnext ootb, but that's
more an issue that needs to be discussed with the asp.net team. We asked
them very early if they have F#ers on the team (or if they are in direct
contact), but they said that wouldn't matter since it's all IL. ;-) Now
after everything is in RC it's much harder to make it work, but AFAIK some
people are still optimistic about it and there is even a repo which seem to
work somehow. So we will see.

Cheers, Steffen
On Dec 16, 2015 22:19, "Mark Seemann" [email protected] wrote:

Here are my thoughts on how to make F# more attractive to 'mainstream'
developers. Oh, dear, here we go:
Make F# a first-class .NET language

You may claim that F# is already a first-class .NET language, but it's
not, really. IIRC, when you install Visual Studio 2015, you have to
actively select F# as one of the optional languages; if you don't select
it, it's not even going to be in Visual Studio.

Furthermore, look at how Microsoft talks about .NET and Roslyn: It's C#
here, C# there, and then occasionally C# and Visual Basic.

This tendency is clear with the new ASP.NET stack, as well as with
Universal Apps.

Outside of the Visual F# team, it seems like F# isn't really on the radar

  • not even in the rest of DevDiv, and certainly not in the rest of
    Microsoft.

The (open source) F# community is doing a great job of tooting the F# horn
via other channels, but the .NET community (if such a thing exists) as a
whole is still largely taking its guidance from Microsoft.

When there's no templates, no samples, no documentation, in Visual Studio,
for most .NET developers it doesn't exist.

What's really been puzzling me for a long time is that Microsoft doesn't
realize what a gem they're sitting on.

Programmers migrate towards better languages. When Java stagnated, many
migrated to Scala (and Clojure). Programming languages matter.
Microsoft as a whole sort of realises this: just look at the scramble
towards JavaScript.

F# is a unique language offering, because it's the only(?) 'industrial
strength' programming language that offers a Hindley-Milner type system.

  • F#: Strongly-typed, Hindley-Milner
  • Scala: Strongly-typed, but not H-M (AFAIK)
  • Clojure: Dynamically typed
  • Erlang: Dynamically typed (I think)

It may not be everyone's cup of tea, but if you want to be 'almost as
Functional as Haskell', but can't convince your organisation to take a
chance on it, F# is a great choice.

Furthermore, due to the interop with .NET, it's easy to gradually
introduce F# into an organisation that already runs .NET.
Better tooling

All that said, better tooling is still needed. As @forki
https://github.com/forki mentions, there's a lot of good to be said
about F# Power Tools, but there are also areas where the Visual Studio
editor seems too 'primitive' compared to the C# editor.

E.g. it'd feel more modern with

  • Code Lens
  • Peek Definition

I don't know if these can be built with F# Power Tools, but since it
hasn't happened yet, I suspect these are some proprietary Visual Studio UIs
that are locked down...
Better web tooling support

Web development is still a thing, and if the web development support is
poor (e.g. lack of templates), you lose a lot of adoption right there.

ASP.NET vNext isn't making it easier to get started with web development
on F#. While I'm aware of alternatives such as Suave (and perhaps Freya),
they aren't going to win C# developers over if it looks like it's
impossible to create an F# web project in Visual Studio.
Faster compiler

The F# compiler is, unfortunately, slow.

Whenever I'm back in a C# project, I'm surprised at how fast I can compile
a much larger code base.

The slow compilation time hurts many development processes, e.g.
Red/Green/Refactor, which should be faster than 10 seconds
http://blog.ploeh.dk/2012/05/24/TDDtestsuitesshouldrunin10secondsorless.
In my experience, it's impossible to keep the cycle time under 10 seconds
on a moderately-sized F# code base, because compilation alone can take 4-6
seconds.

Oh, and while we're talking about compilers, I'd like to downvote [image:
👎] @rodrigovidal https://github.com/rodrigovidal's suggestion for a
multi-pass compiler (sorry, nothing personal). The single-pass compiler is F#'s
most precious asset
http://blog.ploeh.dk/2015/04/15/c-will-eventually-get-all-f-features-right
.


Reply to this email directly or view it on GitHub
#798 (comment)
.

@bryancostanich
Copy link

+1 for the single pass compiler. makes it feel like a language from the 70s.

@7sharp9
Copy link
Contributor

7sharp9 commented Dec 16, 2015

+1 on Removing the reliance on msbuild files, I hate thats stuff, its a common theme with the people I talk to as well.

  • Smooth issues with FSharp.Core, there seems to be a lot of issues with FSharp.Core resolution in thw wild, whether that be not following the guidelines or whatever, there needs to be a better solution be that improved docs or awareness etc. (Better adoption as you don't hit painful FSharp.Core issues with the first oss repo you clone from github)
  • Also more evangelism on other types of F# project such as mobile :-)

@misterspeedy
Copy link

By an amazing coincidence I just did a Twitter poll on exactly this.

"When you've seen people reluctant to use #fsharp, what has been the main reason?"

34% Seen as too hard
33% Office politics
11% Job-preservation
22% Limitations/tooling

(76 votes)

Although my poll was a little mischievous, it does give us some almost-facts to work with.

You'll note that 44% of resistance appears to be pretty much irrational. It's certainly my experience that there are groups of people out there who will actively sabotage F# projects. I think the only way this will end is if Microsoft starts making more public pronouncements in favour of F#. The open source effort for F# is utterly magnificent, but in the corporate mind this is still trumped by lack of MS buy-in.

Next up we have 'seen as too hard' (34%). I have definitely encountered truly talented developers who simply can't get productive with F#. Perhaps the technical fix is for the community to make a huge effort to extend the range of quality templates. There is an immense amount of quality training material out there but more can do no harm. I do have a book idea to address this if anyone out there wants to chuck me some budget. ;-)

Only a fifth of people thought that technical limitations and tooling are the main reason for resistance. So we shouldn't hope for too much here. That said, I would LOVE to see go-to-definition and find-references work between C# and F#. Every time someone asks for this it seems to fall into a political hole between the Visual F# Team, the Visual Studio Team and the Community. But solving it would make the biggest dent in that 22% in my opinion.

@forki
Copy link
Contributor

forki commented Dec 16, 2015

By that same logic we should add more curly braces to the language. ;-)
On Dec 16, 2015 22:44, "Rodrigo Vidal" [email protected] wrote:

@ploeh https://github.com/ploeh Hey Mark, I really like F# single-pass
compiler, I do know it's value. But I really think that it's something that
harm's adoption.

As far as I undestand, Kevin asked about what could drive adoption, not
what I would like F# to be. (That would be lots of language features like
typeclasses but it wouldn't drive adoption). F# is the only language I know
that has this feature, and it's very annoying when you are a beginner.
That's one of the main complaint I have been listening from C# developers
over years.

Maybe I'm wrong. :)


Reply to this email directly or view it on GitHub
#798 (comment)
.

@JonCanning
Copy link

+1 for evangelism

Your average corporate .NET dev will adopt F# when they get paid to. Many are not enthusiasts and don't have the time or inclination to learn anything outside of the 9-5. They're not waiting for that final language or tooling feature to drop before considering it.

@rodrigovidal
Copy link

@forki I think that's too far. :P

@rodrigovidal
Copy link

@gsobocinski Elixir was designed to be ruby friendly. And it's stealing developers mostly from the ruby community. Which community we are aiming if any? @dsyme

@TeaDrivenDev
Copy link

I know I sound like a broken record on this, and people generally disagree with me there, but from my limited perspective and in my environment, one of the biggest roadblocks for F# adoption will be something largely beyond the F# community's control - missing support in IDE tooling, primarily in widely used third-party software like ReSharper or OzCode.

The reason is simple: Initial F# adoption in .NET shops will very often start with single F# projects in larger solutions dominated by C#. The everyday workflow in C# is aided greatly by the available tooling, and when there suddenly are parts of the code that tooling doesn't cover or even know, that causes friction. When someone renames a symbol as they are used to, and then find that the code doesn't compile anymore because that change didn't get into the part written in a different language that one person in the team insisted on starting to use, it's likely not going to make them view F# any more positively, because it even disrupts their work elsewhere.

Yes, it's sad, because the most important thing should be the qualities of the language itself, but .NET development at large is a very tooling-centric affair, and for most people C# and the existing tooling are "good enough" and relatively low-friction, so F# will have a very hard time getting into many places without even rudimentary ReSharper support (say, at least not being blind to F# code for "find references" and renaming).

As for VFPT becoming a part of VFT - yes, it would be great to have all that "out of the box" with Visual Studio, but considering the pace of of the Power Tools and the relatively long release cycles of VFT, that might keep great new features out of people's hands for longer than we are used to having to wait.

@rojepp
Copy link
Contributor

rojepp commented Dec 16, 2015

Getting people to try at all
  • Evangelism - most devs I speak to have heard of F# once or twice, a couple of years back. Great to see such attention recently from the 'Week in .Net' blog. But mostly, F# doesn't exist, because MS doesn't say it does.
  • F# is for math/finance - The initial message from MS really stuck, because no-one has heard anything different since then, see above. I hear this all the time.
  • F# is functional first - It simply is a big step from OO, it requires a curious mind to even give it a try. Not much we can do about that.
  • CoreCLR

I find it interesting that Scala much more often is acceptable even though it, to me, is a pretty messy language. Maybe it is because Java is that much worse than C#?

When they do try
  • As @dsyme mentioned, things like MissingMethodException is incredibly frustrating. I run into it all the time.
  • Tooling - Even with VFPT, tooling feels old. Best tooling around seems to be Xamarin Studio.
  • Compiler speed - Very slow compilation, and this extends to slower tooling as well.

@gsobocinski
Copy link

@rodrigovidal Elixir took a lot from many languages. What I think they've done well is too publicise and promote real examples of using Elixir over say Ruby. What hits home for people is relating it back to something they know and have had experience with. There are lots of war stories with Ruby dev which always get addressed when comparing the two making the decision easier. If we could the same with F# and say C# that would help alot. I think what the guys at jet.com are putting out there is definitely the way to go. Real world examples with proven results. Kind of makes it hard to disagree with.

@mathw
Copy link

mathw commented Dec 16, 2015

Equality: when F# was first included in VS it was installed by default, it was going to be a first-class .NET language, things looked great. It's very clear now that this was never really the case. It isn't a first-class language, it's not installed by default, the tooling isn't as good, and Microsoft don't even talk about it. And it gets left out of the fun: ASP.NET vNext is all C# C# C#. Okay so I don't like MVC as a model for web programming anyway, it's a terrible fit, but if you want to lure .NET developers over you need them to be able to make an MVC project entirely in F# or they won't think it's a real language. Likewise we need to be able to make pure-F# Universal Windows Platform apps. Out of the box. Previously I would have said WPF (it always frustrated me that I couldn't do that when I was a WPF developer) but it's probably a bit late for WPF now! So we need the new build system for ASP.NET 5 to be able to handle F#, and for the tooling to support pure F# projects in this framework. Even though we know Suave is a better fit.

This also applies to developer comms, blog posts about new tech etc. - some of this content should just be in F#. Make it look normal. Start writing chunks of Office in it, or whatever giant .NET projects Microsoft has internally. Tell the world that Azure Logic Apps are powered by F# (I don't know whether they are or not, but it'd be neat if they were). Talk about design patterns in functional languages. Then step beyond equality as everyone realises C# is the last gasp of the old guard before the new(yet still old) comes in.

Evangelism: It's all C# and TypeScript that we hear about from Microsoft these days, yet they're sitting on a language that is better than both of them for both purposes!

Interoperability: There are some dodgy points in getting C# to talk to F# libraries. If that could be smoothed out somehow it would really help get some F# code into existing C# projects.

Tooling: The F# experience in Visual Studio is nothing like C#, even if you discount the influence of third-party tools like ReSharper, which is almost ubiquitous. While it's sad that ReSharper have never felt it necessary to add F# support, Microsoft could put more effort into the F# coding experience, and get it up to par with the out of the box C# experience, which is encroaching further on the classic ReSharper territory every release. Error highlighting needs to be better too - it frequently doesn't seem to be able to pinpoint the source of a problem and just splats wiggly underlines everywhere which is very unhelpful. Everyone, every single language, needs to look at Elm's error messages for the idea of what a compiler can do these days. And Elm shares heritage with F# and uses Hindley-Milner types and type inference, so surely F# could gain some of its diagnostic capabilities.

Performance: Okay so obviously the compiler is working harder to compile F#, all that complicated type inference etc. is what sets F# apart from C# and also makes it slower to build. But if it could be made faster - and surely there are ways to do that - it would help a lot with developers feeling productive. Similarly, the VS tooling needs to be fast. It's too slow doing its overly broad error marking and then removing them when an expression I was halfway through writing is now complete and typechecks properly.

@0x53A
Copy link
Contributor

0x53A commented Dec 17, 2015

Regarding Tooling, one possible solution would be to include the existing PowerTools as a Third-Party Product in the Visual Studio Setup, similar to the Powershell-Tools.

I think for most existing .Net shops, the most likely point of introduction would be one developer liking F# and trying to integrate it into an existing product. For F# to be accepted by the other developers, you need great interop from C# to F#.

Getting started with F#:
I don't know about you, for me, wrapping my head about F# initially was hard. (I knew a bit C# at that point) I think I started the tutorial project three times over half a year, never really understood what was going on and then just closed it. To really motivate people to continue with that, you need to show them what is so special about F#. Not just how they can write in F# what they would write in C#, but also what they could do in F# but NOT in C#.

One great example is here:
http://www.codeproject.com/Articles/87294/Symbolic-Calculation-in-F
http://codereview.stackexchange.com/questions/11804/symbolic-derivative-in-c

You have some foreign looking code in F#, but even just looking at the code, it is more or less obvious if you know your math.
The C# code has so much noise that it's hard to see whats going on.

@moonmile
Copy link

  • custom operator like scala.
    let x = a ∩ b

@enricosada
Copy link
Contributor

@battisti it's not working with F# atm ( but will soon ), something like http://dotnet.github.io/getting-started/ is a simple experience you think it's ok?
pls try it, it's csharp, i know, but project.json and commands are going to be the same for f#

@enricosada
Copy link
Contributor

or as usually an amazing work from @7sharp9 , http://7sharpnine.com/Xebec/

@battisti
Copy link

@enricosada yes thanks the

dotnet new
dotnet restore
dotnet run

workflow looks nice (also the generated files look good, assuming that it is reasonably easy and documented on how to add unit test etc.) BUT the current version terminates with a:

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'System.Console, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

when calling

dotnet run

Xebec does look amazing (like Cargo for F#)!

@forki
Copy link
Contributor

forki commented Dec 24, 2015

Yes there are really good reasons to split paket.dependencies and
paket.references - I hope the docs explain that well enough.

Regarding projectscaffold. Yes the build script is large because it really
does a lot - including deployment to multiple yargets. Again the docs show
you what it does. If you want to know how projects grow with this approach
then look into the Paket project. We have over 5000 commits, it works xplat
and I shipped over 1000 releases with basically the same stuff that is in
projectscaffold. It really works.

Regarding fsproj files. Yes that's super annoying. Many people tried to
come up with something different, but all projects "failed" because it
would always mean a fork in the ecosystem and making things incompatible to
the standard Microsoft stuff. I hope xebec succeeds.
On Dec 24, 2015 17:04, "Alexander Battisti" [email protected]
wrote:

@enricosada https://github.com/enricosada yes thanks the

dotnet new
dotnet restore
dotnet run

workflow looks nice (also the generated files look good, assuming that it
is reasonably easy and documented on how to add unit test etc.) BUT the
current version terminates with a:

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'System.Console, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

when calling

dotnet run

Xebec does look amazing (like Cargo for F#)!


Reply to this email directly or view it on GitHub
#798 (comment)
.

@enricosada
Copy link
Contributor

@forki if it's possible to fix dotnet restore ( because nuget has it's problems ), i think project.json is the same as xebec, only json instead of toml.

For example development-dependencies are going to be merged soon

And dotnet ( the command is only a tool to call csc or fsc, really, install dotnet cli and do where csc ) package is going to be nice, to install coreclr instead to use dnvm directly.
It's not dnx, with in memory compilation, plugin system etc.

Bonus point, project.json give us xproj in visual studio, a common project system for both c# and f#, so less problems.
Sucks it's json because no comments, toml or yaml where better solution, but still.
If we can teach dotnet compile to understand xebec project format to read source files, and dotnet restore to read xebec or packet, it's going to works good, because dotnet-compile-fsc.exe has source files as command line args, doesnt read project directly

{
    "version": "1.0.0-*",
    "dependencies": {
        "Microsoft.FSharp.Core.netcore": "1.0.0-alpha-151221",
        "System.Runtime": "4.0.21-beta-23428",
        "System.Console": "4.0.0-beta-23428"
    },
    "compilerName": "fsc",
    "compileFiles": [
        "Helper2.fs",
        "Helper.fs"
    ],
    "frameworks": {
        "dnxcore50": { }
    }
}

problem is always restore, source files, and compiler args. the rest is fsc al the way down

@enricosada
Copy link
Contributor

@battisti just run the ./bin/Debug/dnxcore50/file.exe after dotnet build no magic there
the dotnet run is only an helper for restore+compile+call exe. , see Microsoft.DotNet.Tools.Run/README.md, try dotnet restore + dotnet compile. or open a bug 😄

@forki
Copy link
Contributor

forki commented Dec 24, 2015

I know that dotnetcli is a way out, I hope they hear our feedback.
On Dec 24, 2015 17:41, "Enrico Sada" [email protected] wrote:

@battisti https://github.com/battisti just run the
./bin/Debug/dnxcore50/file.exe after dotnet build no magic there
the dotnet run is only an helper for restore+compile+call exe. , see
Microsoft.DotNet.Tools.Run/README.md
https://github.com/dotnet/cli/blob/master/src/Microsoft.DotNet.Tools.Run/README.md,
try dotnet restore + dotnet compile. or open a bug [image: 😄]


Reply to this email directly or view it on GitHub
#798 (comment)
.

@7sharp9
Copy link
Contributor

7sharp9 commented Dec 24, 2015

I have no idea how the new coreclr works or how the correct target gets used for the dnx stuff. The idea behind xebec is to make things easier rather than the complicated mess that exists in proj files. First support will be for vscode, atom, and emacs, and that's right after command line support for building, running and testing etc.

On 24 Dec 2015, at 17:54, Steffen Forkmann [email protected] wrote:

I know that dotnetcli is a way out, I hope they hear our feedback.
On Dec 24, 2015 17:41, "Enrico Sada" [email protected] wrote:

@battisti https://github.com/battisti just run the
./bin/Debug/dnxcore50/file.exe after dotnet build no magic there
the dotnet run is only an helper for restore+compile+call exe. , see
Microsoft.DotNet.Tools.Run/README.md
https://github.com/dotnet/cli/blob/master/src/Microsoft.DotNet.Tools.Run/README.md,
try dotnet restore + dotnet compile. or open a bug [image: 😄]


Reply to this email directly or view it on GitHub
#798 (comment)
.


Reply to this email directly or view it on GitHub.

@battisti
Copy link

The quality of the Ionide plugin (version 1.2) with VS Code on OS X using Mono 4.2 stable (using the package installer, not homebrew) improved a lot. It is now usable out of the box and the debugger works (most of the time). The fsproj files are still annoying though.

@jpierson
Copy link

jpierson commented Jun 7, 2016

I don't understand the desire for templates as a way to improve things. I've never been in the habit of using any kind of project template and always see the need for them as a failing of the language, framework, or ecosystem in general. One of the things I've been appreciating about F# is how expressive yet concise code can be. An example is canopy, no real reason from what I can see to have canopy templates because the API/DSL exposed is exactly what you need to write and nothing more.

My hangup has been msbuild/.fsproj baggage and the single pass compiler. I'd prefer the Node.JS experience in terms of lightweight projects that can consist of only dependencies, language/tooling constraints, and code in a nice digestible text based format (preferably code itself such as with Fake). I think these things should lower the barrier to great IDE and editor support because it doesn't not lean so heavily on an IDE support for ordering of files in a project and to add remove dependencies.

On a slightly related note, I really like what Rust is doing with Cargo and was excited to see similar things coming to .NET Core but unfortunately that stuff was recently announced as something that will be retired before 1.0. At this point I'm starting to question what advantages I really have building off of the existing .NET framework, F# and .NET Core are the main things keeping me interested but I'm finding that TypeScript, Node.JS, npm is quite a reasonable alternative without the baggage. Anything that moves F# toward lightweight and flexible tooling will keep me interested and the inverse is also true.

@isaacabraham
Copy link
Contributor

@jpierson Have a look at paket manager - particularly v3 (currently in alpha) which can generate dependency scripts to reference all nuget packages as well as all the other goodies like nuget package dependencies, github dependencies etc..

FWIW I agree that lightweight tooling with emphasis on code first is the way to go. Not sure I would want to lose built-in prevention of cyclical dependencies but getting rid of the heavyweight .fsproj yes.

@smoothdeveloper
Copy link
Contributor

@jpierson just on this matter:

I don't understand the desire for templates as a way to improve things

There are many aspects regarding this kind of concern, I also am better with lean project, empty template but in context of driving adoption within .net eco-system, anything which is available to C# and VB.NET but for some reason is not available to F# (despite, in the grand scheme it wouldn't cost so much to have it implemented), such as winforms & WPF designers, project templates for MS frameworks, all which is related to IDE tooling, etc. is a significant hinderance toward getting F# being adopted.

My experience with the language is short but I faced this big time already, people tend to get iffy when they see this MS language but at the same time, the support is not as "first class" as with C# and VB.NET.

Outside of .net land, I mostly agree with all you bring 😄

@dsyme
Copy link
Contributor

dsyme commented Jul 12, 2016

Closing as we have a Part 2, Part 3 and Part 4 to this discussion.

@Bartolomeus-649
Copy link

The reason I don't use F#

  • I don't know F#
  • I know C# and it solves my problems rather good most of the time.
  • When I search for something all I see is C# (and sometimes VB) solutions and examples.
  • My existing code base is in C#
  • Never meet an F# developer, do they even exists? Where would I find an F# consultant or employee?
  • Most of my code basically consist of fetching some data from a DB, modifying it a bit and then send it on to the client for display, or getting some data from the client, modifying it a bit and then writing it to a DB. It's kind of hard for me to see how F# could do this better/easier than C#?

@forki
Copy link
Contributor

forki commented Apr 30, 2017

Many of us are on github, slack, Twitter,... We do exist

@Bartolomeus-649
Copy link

Yeah...heard the same argument about Jesus ;)

What I mean is, if you have system written in F# and go look for a consultant or an employee to hire, would you find any?
It's a risk when using anything but C# in a dot.NET project.

@isaacabraham
Copy link
Contributor

@Bartolomeus-649 you can google "f# consultancy" and you'll get some results (and even "F# Azure Consultancy" if you feel really dangerous ;-)).

Seriously though, the points you make are all very common ones so you're not unusual there. In my upcoming book I discuss basically all of these issues and concerns. In short: -

  • Yes, you can find F# people (and cross train from C# / VB or other platforms easily enough). Jet basically built their entire development team this way.
  • That "I know C# and it solves my problems rather good most of the time." absolutely drives me crazy (not having a pop at you - a lot of people say it). It suggests that there's a way to quantify how good "rather good" is, and assumes that what we know now is all there is out there. I certainly thought when I was using C#2 that it was "rather good" for solving problems, but when C#3 came out, I realised how ineffecient some of my solutions previously had been in comparison.
  • Regarding the client/logic/db area - F#'s tagline is that it solves difficult problems with simple code. However, it also solves simple problems with really simple code. We do this quite often for our customers.

@Bartolomeus-649
Copy link

@isaacabraham , none of those arguments will make me use F#.

The next time my customer want something, I will need to provide a solution that is better than my competitors, else I will not be doing any coding at all.

And if I would present a solution based on F#, I would not get the job.
I would have to deal with questions like: Why I don't just use C# like everyone else, or Why introduce a new language into our environment that noone else but you seem to know?

Also the cost for a C# solution would be higher than one for C# since either would I need to spend my own time learning F# or I would need to get the customer to pay for the extra time needed for me to learn enough about F# within the project.

The only way to get F# of the ground is for Microsoft to present a nish use for F# where it clearly outperform other languages like C# and VB.NET.

And then there need to be an F# extension for C#, so you could just do some F# stuff with C#, so people will start to understand what F# is all about without switching to F#.
Sure, this F# extension for C# would not allow you to do all that F# can do, but perhaps some of it can be emulated and giving C# a touch of F#.
This would make it a non-issue to use the real F# once people has started to get used to it and start to understand what F# is.

If possible, F# should be just merged in with the next version of C#.

@isaacabraham
Copy link
Contributor

@Bartolomeus-649 I can only speak from my own experience. We use F# because it gives us (and our customers) a competitive advantage as we can deliver reliable, performant and maintainable solutions more quickly and cheaply than we would with other languages. YMMV. The "why not just use C#" argument goes back to my point regarding C#2 vs C#3.

And you can't merge F# into C# - have a look at the C# language repo and witness all the crazy ideas of how some of that would look for a start. But more than that - F# and C# have very, very different goals and ways of doing things. If you just took the ideas of F# and put them into C#, you'd end up with a crazy, crazy language with no clear identity (not to mention many F# features would be massive breaking changes in F#).

You're free to use whatever language you feel like. I'd suggest you at least have a crack at F# though - you might find it dispels some of the FUD you might've been exposed to previously.

@jamessdixon
Copy link

jamessdixon commented Apr 30, 2017 via email

@Bartolomeus-649
Copy link

@jamessdixon So why this thread about driving F# adoption?

@jamessdixon
Copy link

jamessdixon commented Apr 30, 2017 via email

@ploeh
Copy link
Contributor

ploeh commented Apr 30, 2017

Where would I find an F# consultant or employee?

Easy, just advertise for one: http://blog.ploeh.dk/2015/12/03/the-rules-of-attraction-language

@forki
Copy link
Contributor

forki commented Apr 30, 2017

And if I would present a solution based on F#, I would not get the job.

Many people here try to present something that works and has fewer bugs and has short time to market. Sometimes that happens to be written in F#. The advantage is often there but if you think differently or want to ignore it then this is fine. I won't force you to do F#. At least as long as you are not part of my team.

@dotnet dotnet locked and limited conversation to collaborators Apr 30, 2017
@cartermp
Copy link
Contributor

Locking, as the conversation is closed and has drifted far from ways to increase F# adoption.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests