←back to thread

Why F#?

(batsov.com)
447 points bozhidar | 1 comments | | HN request time: 0.41s | source
Show context
rockyj ◴[] No.43546371[source]
I did try F#, but I was new to .NET ecosystem. For 1 "hello world" I was quite surprised by how many project files and boilerplate was generated by .NET, which put me off.

I am all for FP, immutable, and modern languages. But then where are the jobs and which companies care if you write good code?

Now everyone wants languages which are easy to use with AI, while reducing workforce and "increased productivity". I have been programming for 20 years and know 4-5 languages, in India it was worse but in EU at-least I can make a sustainable living by writing Java / TypeScript. I cannot even find jobs with Kotlin + TypeScript which pay well, forget getting jobs in Elixir / Clojure / F# (there maybe a handful of opportunities if I will relocate for around 70K/year). That is why I have mostly given up on learning niche languages.

replies(11): >>43546449 #>>43546522 #>>43546629 #>>43546648 #>>43546914 #>>43546918 #>>43547243 #>>43547274 #>>43547691 #>>43548828 #>>43553311 #
8s2ngy ◴[] No.43546914[source]
I understand your perspective. I like to view niche languages as a medium for learning. For instance, I enjoy using Rust in my personal projects—even if many of these projects may never be released—because the lessons on immutability, functional programming constructs, and trait-oriented programming significantly enhance my day-to-day work. Therefore, I believe that learning niche languages, even in the absence of a robust job market, is worthwhile.
replies(1): >>43547025 #
jen20 ◴[] No.43547025[source]
I'm not sure I'd call Rust a "niche language" any more (perhaps in ~2018) - it's in common use across many big technology companies.
replies(2): >>43547427 #>>43554703 #
homebrewer ◴[] No.43547427[source]
It is extremely niche outside of this bubble.
replies(3): >>43548059 #>>43549836 #>>43550169 #
vlovich123 ◴[] No.43548059[source]
F# will likely remain niche forever. It’s likely that Rust will not given its growing and accelerating adoption by Microsoft, Google and the Linux Kernel.

It just takes time to defeat the 40+ years of c and c++ dominance.

replies(2): >>43548838 #>>43554736 #
johnisgood ◴[] No.43548838[source]
Personally I will always prefer C's simplicity to Rust's complexity. Could be just me.
replies(2): >>43549749 #>>43552342 #
kstrauser ◴[] No.43549749[source]
I find Rust vastly simpler than C. If the code compiles, it's probably a valid expression of the business logic I encoded. I might've screwed up that logic, of course, and no language can prevent me from messing that up. I know! Many have tried, and I've defeated them with my ability to misrepresent my ideas! But at least with Rust, I'm reasonably confident that the code will actually do the thing I asked it to do. I'm never confident like that with C until I've run it a few hundred times without crashing.

(Yes, I'm familiar with the rich ecosystem around helping devs not write crummy C. I worked at Coverity at one point. If anything, that gave me enormous fear and respect of the hoops you have to jump through to be reasonably sure C code isn't completely broken.)

replies(1): >>43555885 #
dboreham ◴[] No.43555885[source]
This seems...a very contrarian sentiment. Imho while C might lead you to create slightly fragile code once in a while, Rust is something like two orders of magnitude more complex.
replies(2): >>43557675 #>>43559130 #
1. aldanor ◴[] No.43559130[source]
Rust is like two orders of magnitude more simple (if you're not going to delve into its darker corners).

You have a single line serialization into/from absolutely anything. You have logging, tracing, cli libraries, error handling - most of those are one liners.

You have enums. Enums are business logic. Enums are often the way the world works.

You press enter and it builds, no pre setups, sub modules, cmake files and whatnot.