Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

DOM APIs are only available in JavaScript, so doing things in the browser in a non-JavaScript language requires FFI—and it's a general truism of programming that FFI tends to be a pain point. Languages that target client-side web development try to compensate for this by offering language-native DOM abstractions of higher or lower quality, but usually you end up having to do something that these abstractions didn't anticipate, and/or incorporate a third-party library from npm, which forces you back into FFI. On the server it's much rarer for some critical piece of functionality to be available only in one language, because the server environment itself is language-agnostic.


As another comment said, you can write client side code in F# which gets transpiled to JS, just like Typescript or CoffeeScript. This approach allows you to use JSX components directly from your F# code. It's very cool. Other FP languages have something similar.

https://www.compositional-it.com/news-blog/fsharp-react-seri...


I suspect a lot of people who might otherwise go to F# are using ReScript for React.


F# allows you to use React pretty much directly, but it has still been only a modest success.


I think F# suffers from being a second class citizen to C# inside of Microsoft. If it ran on a different VM or got more attention it may be more popular. It seems quite nice.


Without access to the .NET ecosystem it would be dead in the water




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: