Hacker News new | ask | show | jobs
by wombat23 2055 days ago
> I evaluated and expected not to like F#. I actually quite like it.

It's funny because that's exactly how I felt when I learned F#. I felt pleasantly surprised and never felt like there was anything bad about the language itself.

I just wish it wasn't so deeply embedded in the .NET ecosystem.

7 comments

> I just wish it wasn't so deeply embedded in the .NET ecosystem.

Kind of amusing, given the whole article is about how great it is that it's embedded in the .NET ecosystem

yes, and I agree with that.

But I also feel like the language is mainly used in a type of business environments that are already tied to .NET infrastructure anyway, and who actually appreciate the interlock.

And it could get much more traction outside of that circle, especially in the open source world.

>But I also feel like the language is mainly used in a type of business environments that are already tied to .NET infrastructure anyway, and who actually appreciate the interlock.

I think that's still somewhat true just because there is momentum carried over from the past, but it's definitely something I see changing in the industry.

.NET used to mean SQL Server and Azure in addition. These days I'm seeing .NET Core with AWS and Postgres.

You can use f# with fable on the javascript ecosystem. And it's quite nice. Better than TS imo.

and now with .net core, its a better cross platform framework.

also, you can target wasm or native image now, no need to install it on the target env.

> native image

Got any examples of this?

> I felt pleasantly surprised and never felt like there was anything bad about the language itself.

After working full time with F# for nearly two years I can attest to this. At worst there's inconvenient things, and as you get deeper into FP you'll wish F# had certain features, but all in all it's an very sane and well designed language. I think the only thing that's caused me any pain is the lack of type classes, and after doing a lot of MVU I wish lenses were a language level feature.

> I felt pleasantly surprised and never felt like there was anything bad about the language itself.

I mostly only miss modules/functors, and being able to use them for abstract data types.

It may seem odd to say it, but given the choice between a runtime managed by Microsoft and a runtime managed by Oracle, I'd be more comfortable with the former.
You might be interested in Ocaml.
Semi-relevant: Dark is being rewritten _from_ Ocaml[0].

[0] - https://blog.darklang.com/leaving-ocaml/

No, they are moving from OCaml because it "has been a little unsatisfactory". If you read their blog post, you will see it's mostly self-inflicted pain: they suddenly discovered vendors don't ship SDK for niche languages, they wrote single threaded code because they couldn't figure out how Lwt - probably the most popular OCaml library - works and apparently couldn't be bothered to ask and failed to understand how the debugger works (like GDB and with documentation shipped with the compiler).

I mean, F# is a very reasonable choice if you want the .Net ecosystem and will most definitely solve the SDK issue but the whole thing certainly didn't convince me to try Dark.

Let's be fair: They're moving away from OCaml because there's a ton of stuff that's impractical about using OCaml, mostly related to the very bare ecosystem tooling that's seen maybe a few years of good light and "Things every language should have by now" features that have been coming soon for 8+ years.
Is the person I'm responding to a member of the Dark development team? I was unaware!
Don't do passive aggressive comment. It's both obnoxious and against the site guideline. State what you have to state.

I just thought your comment was top-level. It's unobvious on mobile.

It's funny you say this when the original article was about the company moving away from OCaml due to a number of issues.
Those issues are primarily unfamiliar tooling and lack of library support, which are indeed fixed by .NET, but could hardly be fixed by anything dissimilar.
Why is it bad that it is embedded in the .NET ecosystem?
Doesn't have the same kind of large and innovative ecosystem around it, like competitors such as the JVM.
It's true the JVM has a large ecosystem, but the .NET one is still pretty substantial. I would also argue there's a fair bit of innovation in the .NET Core world :)
> I would also argue there's a fair bit of innovation in the .NET Core world :)

They need to make it more visible if there is! I think it's pretty rare to see a .NET paper. I can't remember the last time I saw one, where there are tons of major JVM research projects.

It feels like .NET focuses primarily on the library and language side of things. In C# you can write surprisingly low-level optimized code. See the introduction of Span<T> for instance: https://docs.microsoft.com/en-us/archive/msdn-magazine/2018/.... Or huge lists of improvements such as https://devblogs.microsoft.com/dotnet/performance-improvemen....

This is in contrast to the JVM where Java is showing its age, but mountains of work poured into the JVM keep it performant: OpenJ9 and Hotspot, Project Loom, Zero GC, as well as big non-Oracle investment such as Shenandoah GC contributed by Redhat, etc.

I can't say I know what's happening with the CLR itself, but they've shipped several major improvements in the language, server, standard library etc that have brought significant performance gains which make .NET Core one of those most performant stacks on the market.
The innovation in the .net world tends to be by companies in the .NET ecosystem, which historically have not been focused on open source or open research. Improvements in the microsoft world tend to be private.
Yeah. This is probably my only beef with .NET ecosystem. There are a lot of great open source libraries and whatnot, but what you see comparatively little of is core systems a lot of software depends on being written in .NET Core. I'm mainly thinking about all the type of stuff you see in the Apache Foundation.

The language itself is incredible, and just keeps getting better and better with every release.

It'd be neat to see people turning to .NET when writing those kinds of systems, but maybe it's just not cool enough in the Bay Area.

the emphasis is on "deeply".

I think .NET can be quite an advantage, as stated also in the article.

but if I want to, say, set up a dev environment on linux, it comes with a set of quite different dependencies than what other languages use.

I'm using F# and .NET Core on Linux and I actually really like it. I can use my Linux distribution package manager to install different SDK versions side by side (at the moment, 2.1, 2.2, 3.0, 3.1) and the CLI tools automatically picks up the correct version for each solution. I find it superior to other languages like Rust/Erlang/Python where you need to use a tool that manages the SDKs outside of the distro package manager.
What do you mean? There are .debs and .rpms to install .NET Core on Linux just like any other language
Yeah... I thought it's quite simple also. Rider also works on Linux. It's been a great experience for me.