Live data from Hacker News

F# is gaining independence from .NET

onurgumus.github.io

21–30 of 181 posts

Re: F# is gaining independence from .NET

#21
post #13

Earlier quoted context omitted.

You can treat your application as a series of data transforms with C#, as well.

It's.. not as nice. LINQ gets halfway, but, you end up getting back to procedural modeling soon. With sufficient discipline and structure, and liberal use of LINQ and lambdas, you can mostly get there, but it lacks the purity of pure functional.

And in the process you've incurred a devastating amount of micro-allocations. When using Unity with an older version that doesn't have incremental GC this is a serious problem.

Does F# avoid that?

Re: F# is gaining independence from .NET

#22
post #14
post #7

Earlier quoted context omitted.

The functional hammer can be a little easier to reason about. So you can understand your application a little more.

It's possible to write functional C# code, as well.

Yeah you can. I find it a little more clunky. Many of the things I prefer are just syntactic sugar. But if I'm honest I really like syntactic sugar.

On top of that I find functional first languages are great for forcing you to learn functional styles that you can later user in languages like C#.

C# is a brilliant language and I wouldn't knock it. I'd use that as a first option at work but on a hobby project I'm going to play with F#.

Re: F# is gaining independence from .NET

#23

Love the idea behind the game engine for Xelmish https://github.com/ChrisPritchard/Xelmish Its made on top of monogame and should have a battle tested core. But the lack of knowledge/adoption for Xelmish is disappointing.

Thanks for sharing this. I loved using XNA for many years!

Re: F# is gaining independence from .NET

#24
post #11

Earlier quoted context omitted.

It's a real shame, but not unexpected. The vast majority of programmers I meet in the wild simply do not have training in FP and by the time they decide to learn it (if they do), it's hard to unlearn "traditional" thinking. If we want to steer programming in that direction, we should teach functional programming before "traditional" programming. However, even if we manage to do that I'm not convinced that it will mak…

I think one problem is (was?) winforms is not available in f#. (which is c# unique selling point i. m. h. o.)

Are you thinking of something else than winforms?

I believe winforms and WPF has always been usable but not with the visual designer tooling in visual studio.

UWP has been trickier though to my knowledge.

Re: F# is gaining independence from .NET

#25
post #15

F# is a great language, but the .NET community never embraced it.

Agree, although C# is constantly evolving.

That certainly is playing a huge part in it. C# is importing more and more F# features so people aren't really inclined to switch.

Re: F# is gaining independence from .NET

#26
post #13

Earlier quoted context omitted.

You can treat your application as a series of data transforms with C#, as well.

It's.. not as nice. LINQ gets halfway, but, you end up getting back to procedural modeling soon. With sufficient discipline and structure, and liberal use of LINQ and lambdas, you can mostly get there, but it lacks the purity of pure functional.

But F# isn't a pure functional language, is it? https://www.google.com/search?q=is+f%23+a+pure+functional+la...

Re: F# is gaining independence from .NET

#27
post #12

Earlier quoted context omitted.

It's a real shame, but not unexpected. The vast majority of programmers I meet in the wild simply do not have training in FP and by the time they decide to learn it (if they do), it's hard to unlearn "traditional" thinking. If we want to steer programming in that direction, we should teach functional programming before "traditional" programming. However, even if we manage to do that I'm not convinced that it will mak…

I'm a long-time Emacs user, Scheme fan, functional programming advocate ... Who uses C# in his day job. For quite a long time F# simply wasn't ready, and by the time it was C# had already become an industry behemoth. But more critically, it's not a language that's officially supported by Unity. That's enough for it not to be a wise choice to be betting a project on it where there are dozens of jobs on the line, and f…

I can't say that I've ever known anyone who uses Unity professionally but if that's your line of work it would be a big factor.

Re: F# is gaining independence from .NET

#30
If F# ever got something akin to Scala Native, or Kotlin Native, I think it'd do really well. In my limited understanding of the F# ecosystem, I don't believe there are a lot of voices calling towards a multiplatform future beyond the NET world. Fable is cool, but native is a must-have for a lot of people, myself included.

The docs are bad but not inexcusably so, it's a nice project within MS, I get it. The underlying machinery leaks a little into the language, things like "discard" are irritating but not unforgivable. And it's not just running native, I know NET nerds will want to tell me about corert or native or whatever it's called, but that doesn't solve the issue. F# has a weak core, it's not like Clojure where I have this wide array to choose from regardless of the platform. I can choose NET or Fable and the development experience varies wildly between those two environments, in my limited experience.

All in all, I think F# will live a medium-length life. Without solving the native problem and moving beyond NET, I don't see it flourishing in many important niches.

If I was going to adopt a new language, it'd probably be Nim over F#, etc.

Post reply on HN