24 ms·
Has someone done a comparision of Reason+Bucklescript with Fable[1] ? F# has embraced the OCaml syntax while at the same time cleaning out many of the warts (+
by lf-non 9y ago
Has someone done a comparision of Reason+Bucklescript with Fable[1] ?
F# has embraced the OCaml syntax while at the same time cleaning out many of the warts (+., do end etc.). It also now has good tooling available on all platforms.
Despite being a full time javascript/typescript developer I find F# syntax much more appealing and easy to grok than Reason's js inspired syntax.
[1] http://fable.io http://fable.io
- erokar 9y agoCompletely agree. I much prefer the ML syntax to ALGOL-like syntax.
- k__ 9y agoNice thing is, Reason converts lossless to OCaml, so all the ML fans can profit from the money FB pouring into the ecosystem.
- lf-non 9y agoWould it not have been much more pragmatic for FB to have collaborated with MS instead on F# support in dotnet core? That seems more practical given the context that F# can directly benefit from things like concurrency support in dotnet core. Of course, F# has not always been the favorite lovechild of MS, but the OCaml ecosystem does not seem to be in a particularly stellar state either.
- k__ 9y ago"the OCaml ecosystem does not seem to be in a particularly stellar state" Maybe that's a good thing for Facebook?
- chenglou 9y agoWe already use ocaml to write Hack, Flow and Infer, so just from a corporate standpoint, this move to incrementally adopt more of a language that's had many success stories internally makes sense. From an individual standpoint, there are some unique aspects of OCaml that we like a lot. The properties of BuckleScript for example (tiny output, great js interop, fast simple compilation). No doubt that the ecosystem could be improved, but that's what we're here for and what we're willing to do.
- wtetzner 9y ago> Of course, F# has not always been the favorite lovechild of MS, but the OCaml ecosystem does not seem to be in a particularly stellar state either. I'm not entirely sure what you're referring to, but OCaml has been around and used for real work for much longer than F#. I'm not sure it's so clear cut.
- wtetzner 9y ago> F# has embraced the OCaml syntax while at the same time cleaning out many of the warts (+., do end etc.). It also now has good tooling available on all platforms. Unfortunately, it also drops my favorite thing about OCaml, which is the module system. I also like that there are different operators for ints and floats. It makes it very clear when you've accidentally mixed the two.
- xfer 9y agoYou can't accidentally mix floats and ints, it's a typed language.
- wtetzner 9y agoIt's typed, but the types can be fully inferred. If you didn't specify the types of your function, it could end up being inferred as float -> float -> float instead of int -> int -> int. The different operators are a concise way to tell the type-checker that you're working with floats.
- xfer 9y agoNo it won't be inferred as float->float->float if there is an int literal or whatever base type you pass to the function. Check typeclasses for how this works.