EDIT: haha here it is https://github.com/facebook/flow/issues/4785
Nobody should be using Flow.
Assignment is still there though (ie you can still assign a `Cat[]` to an `Animal[]` and push a `new Dog()` into it).
class Animal {}
class Cat extends Animal { meow() {} }
class Dog extends Animal { woof() {} }
function foo(animals: Animal[]) {
animals.push(new Dog)
}
const cats: Cat[] = [new Cat];
foo(cats);
https://www.typescriptlang.org/play/#code/MYGwhgzhAECCB2BLAt...When you mentioned "covariant param passing" I assumed you were referring to the long-lasting issue about callbacks, hence my original comment mentioning that that issue has been fixed. It's not useful to differentiate between "assigning a value to a variable of a certain type" and "passing a value to a function parameter of a certain type" because those are identical.
(I don't ever have to have any `any` in my ReasonML code, but it was unavoidable with Flow.)
1. https://reasonml.github.io/blog/2017/09/08/messenger-50-reas...
2. https://github.com/facebook/flow/issues?utf8=&q=is%3Aissue+i...
Microsoft has paying customers who are devs, and FB doesn't. That explains a lot.
[1]: https://www.bloomberg.com/company/press/open-source-at-bloom...
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.
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.
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.
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.
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.
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.
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".
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.
Maybe it will be ironed out someday...
If I recall correctly, everyone managed to set things up swiftly, with an exception of one Windows user who had some editor issues.
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`
- 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
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.