Live data from Hacker News

Why F# could be the next mainstream programming language (2024)

blog.snork.dev

31–40 of 99 posts

Re: Why F# could be the next mainstream programming language (2024)

#32

When your top reason for a language being mainstream is "interoperability with .NET", I think the argument is a stretch.

I understand where you're coming from, but I'd challenge your dismissal of that note by noting how seemingly powerful a large ecosystem of available packages is when onboarding people to an ecosystem.

I don't think Scala, Kotlin, or Clojure would have had as much adoption if they hadn't had access to the JVM ecosystem of libraries available.

While it's not the only benefit, I think one could just point at the usage of OCaml as the alternative to F#. While both are in the lower percentages of language popularity/usage, I've worked with at least 50 (dozens lol) people who were paid to write production F#.

Re: Why F# could be the next mainstream programming language (2024)

#33

Wishful thinking, me thinks. How good are the AI coding agents at coding F#?

Comparisons to typescript/node (which I have more ai hours in, but equal experience) Pros: * type system is less flexible which simplifies things for the ai * mostly functional code * the language hasn’t evolved as much as others because it’s had a strong foundation of features for a while, leading to the corpus containing fairly common themes Cons: * smaller corpus * no reliable hot reloading, which causes annoying…

> then forgetting to stop it and hitting errors from starting it again

This one is easy to fix. Give it a script that both kills the old process and starts the new one. Then it can't forget. This is what I do; categorically solved the problem.

Re: Why F# could be the next mainstream programming language (2024)

#35
post #11

Earlier quoted context omitted.

Not only. I don't want to use Microsoft technologies unless forced to or no better alternatives (GitHub/ vscode)

If you feel forced to use vscode due to "lack of better alternative" but then stop at using .NET, then you're really missing out on tools that lack better alternatives. .NET has spoiled me so badly with C#, NuGet, and the debugger that I just don't have the patience for any other languages with their half-assed build systems, janky package managers, and after-thought debuggers. MSBuild and the dotnet CLI tool may not…

> NET has spoiled me so badly with C#, NuGet, and the debugger that I just don't have the patience for any other languages with their half-assed build systems, janky package managers, and after-thought debuggers.

Rust and cargo are pretty good and only getting better. I don't really see a good use case for anything dotnet when JVM exists

Re: Why F# could be the next mainstream programming language (2024)

#36
post #28

F# is a chimera of a language. The functional parts of the language are nicely designed: no nulls, discriminated unions (ADTs), you write simple functions in simple modules and there is nothing that is too clever to understand: it's very pragmatic. Then there is a whole lot of stuff like inheritance, classes, interfaces, nulls mainly there for dotnet interoperability that gets very ugly very fast. There are way too m…

Well there are the 3 you mentioned (records, classes, and tuples) which should be easy enough to differentiate from each other. The struct versions aren't necessary to use in most cases, and are an optimization.

The thoughtful, but not breakneck speed of changes within the language is one thing I appreciate a lot. Things do get added (there are proposals and discussions that are fairly regular in the GitHub repo for language design matters). A recent example is adding a spread operator.

Re: Why F# could be the next mainstream programming language (2024)

#38

Could be! Depends if MS starts putting some more money behind it, including marketing. They're pretty deep in an AI-everything spiral right now though. I'm a Clojure guy, but the ML family (specifically OCaml and F#) have always interested me as another branch of functional programming. I started out in the before times as a .NET Programmer (VB6 -> VB.NET -> C#) and have toyed with F# a little since then. It's cool,…

I had a thought today, "when is Microsoft and/or Apple going to earnestly search out their next Steve Jobs?" And I think the answer is that guys like Bill Gates and Tim Cook are too proud, too prideful to admit they are not kickass rockstars of tech, too jealous to find and cultivate their next super-figurehead. Instead they are safe and lame. Microsoft needs a non-lame, non-MBA, engineer to take control and inject s…

That was supposed to be Scott Guthrie but he got pulled into the Azure whirlpool.

Re: Why F# could be the next mainstream programming language (2024)

#39
post #26

I think, we’re not far from the day when LLMs will be spitting out highly optimized ilasm/byte-code (dotnet intermediate language representation). So your programming language will well and truly be a bunch of prompts. That’s it.

What would be the benefit to this versus generating highly optimized c# for example?

The benefit to this is that we talk in tokens, no longer bytes. The Microsoft era where you had to work in bytes is over, now we work with tokens e.g: I build a snake game with 500 tokens, welcome to the future!

Re: Why F# could be the next mainstream programming language (2024)

#40

Not having exceptions doesn't seem like an advantage. My experience with either tough me that some infrastructure error are better as exceptions. Kotlin handling of nulls is probably the most elegant. And you do not need. Net. When you want 20 pods in kubernetes you probably want some alpine image instead of windows

As noted in another sibling comment, f# has exceptions and they're a good tool to use.

Some folks opt to go full "railroad-oriented programming" mode, but using both has more benefits. Here is a good article on it: https://medium.com/@lanayx/practical-error-handling-in-f-c3c...

Post reply on HN