|
|
|
|
|
by hongbo_zhang
3354 days ago
|
|
Indeed, fable is a very neat project, but to be honest, it is not as mature as BuckleScript at this time. For example, it takes around 20~80ms to compile a single file for BuckleScript, while Fable would talk 10x more to compile. Its generated code is pretty but its performance is not very good, see this issue (https://github.com/fable-compiler/Fable/issues/646) "this can make a difference in speed of up to about six or seven times for tight loop code using tuples, records, lists, unions, etc.(compared with BuckleScript)" But Fable is a nice project, JavaScript platform is large enough to have both :-) |
|
That said, I think doing a fair comparison is going to be difficult. Although OCaml and F# share the same background, I think the OCaml and F# communities care about quite different things - and this can be seen in the difference between BuckleScript and Fable. OCaml compiler is very fast and produces efficient code and so it feels reasonable to expect the same for BuckleScript. F# is often slower, but people tend to care a lot about making interop nice. You can see this with the React bindings and Elmish tooling.
Those different goals are exactly the reason why there is room for both. I think Fable vs. BuckleScript mirror the philosophy of F# vs. OCaml with respect to .NET and native.