Fable: F# to JavaScript compiler
fable.io
Fable: F# to JavaScript compiler
1–10 of 74 posts
Re: Fable: F# to JavaScript compiler
#2Re: Fable: F# to JavaScript compiler
#3Re: Fable: F# to JavaScript compiler
#4great! now we just need more than two people that know f#. i keed...kinda ;)
Re: Fable: F# to JavaScript compiler
#5The first thing I worry about reading something like this is how leaky the abstraction will be. I would love to ditch JavaScript for pretty much anything else but if I need to think about the JavaScript part anyway because of certain things that I can or cannot do I prefer to think in JavaScript from the get go.
I think Fable strikes the right balance. There are some leaky aspects of how it compiles to JS, but this means that you can quite well use it with existing JS libraries and for things like parsing JSON (you can just cast JSON object to F# records and it'll work).
So, you need to think about something about the JS part when you want to do JavaScript-y things, but you still get plenty of nice help from the F# compiler when writing the logic that the functional-first style makes so much easier.
In my experience with Fable, this pragmatic approach is what makes it great.
Re: Fable: F# to JavaScript compiler
#6great! now we just need more than two people that know f#. i keed...kinda ;)
some people said in the Reason3 update article that F# is better suited for JS devs than OCaml.
Re: Fable: F# to JavaScript compiler
#7great! now we just need more than two people that know f#. i keed...kinda ;)
https://np.reddit.com/r/fsharp/comments/6tdrwq/after_so_many...
Re: Fable: F# to JavaScript compiler
#8The first thing I worry about reading something like this is how leaky the abstraction will be. I would love to ditch JavaScript for pretty much anything else but if I need to think about the JavaScript part anyway because of certain things that I can or cannot do I prefer to think in JavaScript from the get go.
Their isn't actually much of an abstraction in one direction, valid ES6 is valid TS and the types are inter-operable.
Throw in better typing, proper classes, down compiling of async/await to ES3/ES5 (still magic to me) and the ability to progressively port from one to the other (and you can even get a lot of the TS benefits just by annotating your existing JS as a good first step to moving to TS) and for me it was a no-brainer.
I don't think TS is a pretty language but it's a fantastic approach to getting from shitty-A to less shitty-B.
Pragmatism wins for me as much as I'd love to just write everything client side in something else.
Re: Fable: F# to JavaScript compiler
#9Earlier quoted context omitted.
some people said in the Reason3 update article that F# is better suited for JS devs than OCaml.
i saw somewhere an article mentioning "why don't more people write f#" (mebbe it was on h/n)? I have never had to really worry about concurrency and if you've got a good familiarity with C#, you're halfway there to being a very productive in TypeScript, so I don't see exactly where F# fits in, considering the best parts of C# are its functional bits.
I don't expect to convince anyone in a HN discussion, because that's not how arguments about programming languages work, but have a look at testimonials (http://fsharp.org/testimonials). You'll see that many people who started using F#, are very happy with it because it lets them solve problems faster with fewer bugs and they enjoy it more.
Re: Fable: F# to JavaScript compiler
#10great! now we just need more than two people that know f#. i keed...kinda ;)