7 ms·
I wish this comparison included more information about the developer experience of TS vs Reason. In my off time I've tried out Reason, but one of the major stic
by jameskraus 7y ago
I wish this comparison included more information about the developer experience of TS vs Reason. In my off time I've tried out Reason, but one of the major sticking points was how _poor_ the experience was setting up an editor with autocomplete and type hints. You get that basically out of the box with TS, but Reason & OCaml have a more fragmented ecosystem, so it's much harder to get started and feel productive.
IMO, the beautiful type system is nice, but the DX with TS is much more productive than Reason or OCaml.
PS: Do you think my comment is dumb? Reason/OCaml are easy to set up? It's as easy as 1-2-3? Please link me tutorials or resources that prove me wrong. I'd love to get started, but DX has been the major hangup again and again.
- Dude2029 7y agoEvery technology created at Facebook is meant for internal use. The wider community then goes through the pain of making it usable. Microsoft's mission on the other hand is pleasing developers hence VS Code and TS.
- smt88 7y agoI remember when people got excited about Hack, Flow, and Nuclide (or whatever the Facebook IDE was supposed called), but eventually realized the same things that you and GP realized. Microsoft has paying customers who are devs, and FB doesn't. That explains a lot.
- k__ 7y agoAs far as I know BuckleScript isn't a FB project.
- chucksmash 7y agoIt isn't[1]. It's a "partner project" to ReasonML which ReasonML relies on[2]. [1]: https://www.bloomberg.com/company/press/open-source-at-bloomberg-introducing-bucklescript/ https://www.bloomberg.com/company/press/open-source-at-bloom... [2]: https://reasonml.github.io/docs/en/what-and-why https://reasonml.github.io/docs/en/what-and-why
- notus 7y agoUgh yeah, the same thing happened with Flow. Massive immediate adoption by react developers and then FB basically saying "screw you" no roadmap and we're never going to add the features you want. I think I still have an open issue in the flow repo for a roadmap. EDIT: haha here it is https://github.com/facebook/flow/issues/4785 https://github.com/facebook/flow/issues/4785
- ryanar 7y agoFlow engineers communicated a few months back to the community saying that they do care, they just were a small team working on the project and had pressing issues at FB to solve first. They mentioned that Flow was really slow for the large-scale projects that existed at FB and so performance was the immediate concern and that ate a year of time after they open sourced the project.
- pknopf 7y agoSounds like it's on life support. Nobody should be using Flow.
- kevinb7 7y agoThis really depends on what you care about. Flow is much better at ensuring type safety in your code while TypeScript has some pretty glaring holes in this respect. In particular, TypeScript allows covariant assignment and param passing which makes it really easy to write unsafe code.
- Arnavion 7y agoThe covariant param passing was fixed some time ago with the (now on-by-default) `strictFunctionTypes` option. Eg `function f(cb: (_: Animal) => void) { cb(new Dog()); }` can no longer be used as `function takes_cat(_: Cat) { } f(takes_cat);` Assignment is still there though (ie you can still assign a `Cat[]` to an `Animal[]` and push a `new Dog()` into it).
- tengbretson 7y agoThis mirrors my experience. I really wanted to like their Nuclide editor, but it was a broken out of the box experience every time.
- alde 7y agoYes, so true. Wish Facebook stated this explicitly on their projects readmes.
- bartq 7y agoYeah, FB releases libraries only to avoid walled garden situation when they can't hire new people because they're not pre trained or they don't want to use closed and internal only technologies. Remember React licensing problems? These days most of frontend jobs are actually React jobs, which i don't like, I like vanilla web. Over the time I began more and more appreciate Microsoft's "boringness" (which is debatable itself) because their tools are real products, not marketing tools for developers. What matters more for serious project is tools quality, not few hot CS ideas loosely implemented on a knee.
- coding123 7y agoI'd argue Yarn, React, Jest, PyTorch, Hack (and flow even if it's not used much) are examples that show not true. GraphQL may be one of the one of the only examples that needed a bit more to be usable outside of Facebook. All of the others are generally usable out of the box.
- tyri_kai_psomi 7y agoRust was created to solve's Mozilla's problems with C++ Go was created to solve Google's problems with C++ and engineering at scale The fact that TypeScript wasn't created to solve a big issue internally at Microsoft is exactly what makes me skeptical of it and personally I view it as a trojan horse, just like VSCode. Sure, today it is done for benevolent reasons, maybe, but what about tomorrow? What if that trillion dollar market cap starts tanking? Then The benevolent VSCode and TypeScript ecosystems become levers to pull in the great big machine. I would almost feel better if I knew it's stated explicit purpose upfront and what Microsoft's long term goals to monetize the ecosystem/platform were, because then I know what I am signing up for.
- sdegutis 7y agoMicrosoft almost definitely has a 30-year-plan with TypeScript that is only slowly being revealed.
- leeter 7y ago> The fact that TypeScript wasn't created to solve a big issue internally at Microsoft AFAIK it was, the issue was the poor quality of Javascript development they were having and their inability to really get good tooling and static analysis. Then it kind of exploded as other people said "That's cool" and they then pushed it out as open source so that if they did need to let it go it wouldn't be totally dead in the water.
- WorldMaker 7y agoTypescript was created to solve big issues internally at Microsoft, to deal with JS at scale. Microsoft has huge JS codebases, almost all of which are Typescript today. Office.com (including in-browser, online versions of Word, Excel, PowerPoint), Outlook.com, OneDrive.com, portal.azure.com, dev.azure.com, and so on. Microsoft may not be as recognizably a "web applications" company, but they do have a number of really big web applications, and they had real scaling problems with JS that Typescript was directly built to help with. VSCode was started to see if they could build a good web application for development. Portions of it directly power a number of tools of Azure (on portal.azure.com), portions of it also directly powered the Dev Tools inside IE10+ and Edge "Classic". Bundling the web app into an Electron container after it had already paid for its own engineering efforts several times over as reusable sets of components for multiple large web apps Microsoft needed hardly seems like a "trojan horse" to me.
- ernst_klim 7y ago> Every technology created at Facebook is meant for internal use. Technology is a stretched term for ReasonML. It's a simple syntactic sugar for OCaml. It uses standard OCaml compiler and standard JS transpilers, like js_of_ocaml and bucketscript.
- thedufer 7y agoI've never used Reason, but I find OCaml very easy to set up. This probably depends a lot on how well-supported your editor is. My setup involves: sudo apt-get install opam inotify-tools m4 opam init opam switch 4.07.0 opam install dune merlin ocp-indent and then add the ocaml layer to my spacemacs config. This gives me auto-indenting, syntax highlighting, type hinting, and my preferred build tool (dune w/ inotify). FWIW, this was much worse when I did it a couple of years ago. I think the ecosystem has made pretty big strides recently, much of which came from standardizing on dune as the canonical build system.
- johnisgood 7y agoI typically install all what you listed, and tuareg. Worth noting that after installing these packages, they tell you how to configure your text editor, or you can choose to let them handle it for you automatically (IIRC). So yes, it is pretty easy to set OCaml up.
- thedufer 7y agoI believe the spacemacs ocaml layer pulls in tuareg automatically, but that's a good point for other setups.
- k__ 7y agoI have to admit, Reason is a bit more obscure. I installed bs-platform and still got errors from my IDE about bs-platform missing. Which was strange, since I used the bs-platform CLI tools. Turns out you also had to have bs-platform installed locally, but the error messages didn't say anything about this, just "bs-platform not found".
- bgorman 7y agoYou are looking for "reason-language-server". You can download a VSCode extension with it from the VSCode "marketplace", and if you use a different editor like Vim you can use the language server with whatever vim language server plugin you prefer. I will admit this is a little bit more confusing than would be ideal, because there is also an older ecosystem called "Merlin". If you are a reasonml beginner, avoid plugins that use Merlin.
- jameskraus 7y agoUnfortunately I could never get RLS to work for me. I opened an issue on it, but it seems like the small group of people with the same issue haven't had the time/drive/knowledge to fix it. The maintainer doesn't want to fix it himself, but I don't blame him, he doesn't have the same error :/ Maybe it will be ironed out someday...
- bgorman 7y agoCare to share the issue? I'm willing to look into this
- johnisgood 7y agoWhat is the issue with merlin? Are you referring to https://github.com/ocaml/merlin https://github.com/ocaml/merlin? I have been using it (with OCaml) without any problems.
- bgorman 7y agoMerlin requires opam, which is yet another tool beginners need to fight with. Reason support for Merlin was relatively recently merged, so it might work ok right now- but I couldn't get it to work with Reason the last time I tried. I agree it works fine with Ocaml.
- brobinson 7y agoI spent hours following the (multiple sets of disparate) instructions to set RLS up, and I was never able to get it working so I gave up on ReasonML. I like the concept, but it needs to be as easy to get up and running as Rust/Rust's "RLS".
- StreamBright 7y agoI agree with you. Reason was harder to set up, but it got better nowadays.
- a0 7y agoThere was a workshop at the last ReasonLDN meetup. Here are the slides that were used, they include quickstart instructions: https://docs.google.com/presentation/d/1wuAveSHslRfKShD6SiVdkz9OOyEfsto0nAQqmcjaun0/edit?usp=sharing https://docs.google.com/presentation/d/1wuAveSHslRfKShD6SiVd... If I recall correctly, everyone managed to set things up swiftly, with an exception of one Windows user who had some editor issues.
- ernst_klim 7y ago> how _poor_ the experience was setting up an editor with autocomplete and type hints. What? Merlin does all of these right out of the box, and supports emacs, vim and LSP [1]. The setup is basically `opam install merlin` and then `your-editor-package-manager install ocaml/reason-mode` [1] https://github.com/ocaml/merlin https://github.com/ocaml/merlin
- yawaramin 7y agoNowadays I'd be surprised at people having trouble setting up ReasonML tooling. It should be just: - npm install --global bs-platform # (you need to ensure you have write access to the global install path) - Fire up VSCode - Install the reason-vscode extension - Run `bsb -init my-project -theme react-hooks` (assuming you want to scaffold a new ReasonReact project) More details at https://reasonml.github.io/docs/en/editor-plugins https://reasonml.github.io/docs/en/editor-plugins