News for hackers. Stuff that matters.
Re:A new F# compiler feature: graph-based type-checking by Capricorn2481 on Sunday November 05, 2023 @11:52AM (#38152860)
I looked at Fable and the resulting code just looked way more complicated than anything Javascript could write. I'm interested in F# still on the backend, but I don't think people "haven't discovered" Fable, it's just not a great alternative.
Re:A new F# compiler feature: graph-based type-checking by obeavs on Sunday November 05, 2023 @12:40PM (#38153415)
Yeah, I suppose it depends on what you're building.

Three years of building with it (plus constant re-evaluation of that decision) has supports our conclusion that it is far more concise and easier to manage (esp for less technical folks who need to sign off on the business logic/domain) than anything we'd have done in JS.

With that said, we're building a product that requires much more interactivity than most, and we're performing a lot of typical "back-end" logic in the client - that might color our evaluation.

To be sure, it hasn't been without tradeoffs, but we haven't found those tradeoffs to be at the language level.

Re:A new F# compiler feature: graph-based type-checking by durable_queue on Sunday November 05, 2023 @12:54PM (#38153582)
The generated JS is only somewhat readable, but you're not supposed to be reading the F#.
Re:A new F# compiler feature: graph-based type-checking by Capricorn2481 on Sunday November 05, 2023 @02:22PM (#38154621)
I'm not supposed to read the F#?? Someone should tell the Fable guys
Re:A new F# compiler feature: graph-based type-checking by catlover76 on Sunday November 05, 2023 @01:10PM (#38153774)
Is it really appreciably different from "transpilation" with TypeScript?

Like, I have seen a little of both (I've used a lot of TypeScript, but who actually looks at the output JS lol), and while I agree the JS output from Fable seemed surprisingly verbose, I'm not sure I see how it practically matters unless one is worried about bundle size or something.

Re:A new F# compiler feature: graph-based type-checking by Capricorn2481 on Sunday November 05, 2023 @02:22PM (#38154618)
I'm not talking about that JS output, I mean the F# itself. While I'm not the most familiar with F#, I've enjoyed other languages that transpile to JS a lot more.

For whatever reason, F# to me looks surprisingly verbose in Fable, which is odd because it's pretty terse on the backend.

Re:A new F# compiler feature: graph-based type-checking by catlover76 on Sunday November 05, 2023 @02:24PM (#38154637)
Oh, I see. You said "resulting code", that's why I thought otherwise.
Re:A new F# compiler feature: graph-based type-checking by Capricorn2481 on Sunday November 05, 2023 @02:28PM (#38154684)
My mistake!
Re:A new F# compiler feature: graph-based type-checking by phillipcarter on Sunday November 05, 2023 @01:25PM (#38153975)
FWIW the benefit tends to come in the long run. Same argument as TypeScript, really. You add some conceptual overhead to get code that fails less in the face of change, better refactoring, etc.