Earlier quoted context omitted.
This sucks because, in the first few years, flow had much better soundness and typescript had some serious issues. I'm a little disappointed and feel as though, similar with Kube vs Swarmkit, the worse technology is winning.
I worked with Typescript for 2 years, then worked with Flow for 2 years and now I'm back on Typescript working for a big company. I agree that Flow had better capabilities around soundness. But the tooling around Typescript really made me jealous, specifically in VSCode. Near the end of working with Flow, Typescript was getting some cool capabilities like refactoring JSX for React apps. Nowadays I can easily say that…
Yarn's Future – v2 and beyond
221–230 of 239 posts
Re: Yarn's Future – v2 and beyond
#222Earlier quoted context omitted.
There are type systems that don't have anything like "any" - you find that in languages like OCaml or Haskell. But in TS, the main reason for "any" is interop with JS.
Thanks. So in OCaml/Haskell you can write perfectly sound programs?
Re: Yarn's Future – v2 and beyond
#223Earlier quoted context omitted.
There are type systems that don't have anything like "any" - you find that in languages like OCaml or Haskell. But in TS, the main reason for "any" is interop with JS.
Thanks. So in OCaml/Haskell you can write perfectly sound programs?
A lack of soundness is closely related to the Turing completeness, especially in languages based on HM. In an ideal world you would want a sound type system and not want Turing completeness, but the tooling doesn't exist to make those choices the most pragmatic right now.
Re: Yarn's Future – v2 and beyond
#224The JS ecosystem has its flaws, but one has to appreciate the speed at which momentum shifts, making clear winners obvious. The move towards TypeScript 'winning' has been fast, and to everyone's benefit.
> , and to everyone's benefit. Why? I've worked on large codebases in Coffeescript, ES6 and Typescript. Whatever this whole community sings and believes, but Coffeescript still wins for me. ES6 is still trying to catch up but will probably never reach the beauty and ease of Coffeescript. Both are transpilers, only ES6 with Babel is a total horror to manage (just upgraded a large codebase to Babel 7..). Typescript tak…
https://github.com/krakenjs/zoid
Admittedly Flow, not TypeScript -- but 99% the same thing syntax-wise. And yes -- it was difficult to set up and get working comprehensively, but now it's there, it's fairly easy to maintain, and it's invaluable when refactoring, accepting PRs, or adding new features.
Most people using `any` should really be using `mixed` (flow) or `unknown` (ts) which at least force you to check before you use some property of those types.
Re: Yarn's Future – v2 and beyond
#225There appears to be a real movement to move from Flow to typescript. Is Flow dying?
[0]: https://medium.com/@bluepnume/introducing-paypals-open-sourc...
[1]: https://medium.com/@bluepnume/jsx-is-a-stellar-invention-eve...
Re: Yarn's Future – v2 and beyond
#226If you use the yarn cli and have tried the npm cli recently, why do you still use yarn? Are there big gaps that you find that NPM has failed to close?
I still come across bugs (that are definitely in npm itself) that have been around absolutely forever, like:
> npm ERR! cb() never called!
It sometimes gets its primary purpose, dependency resolution, wrong. I'll give it a perfectly reasonable package.json to install, which it will do, and then `npm ls` will still error with "missing dependency!" in some package. This should not be possible.
Related, it will put packages from the flattened tree in the wrong place. I can have a dependency (that other dependencies need, specified in their peerDependencies) specified in my top-level package.json and bafflingly, npm will still move it from top-level node_modules into the node_modules of something else that happens to use it, breaking the peerDependencies I was trying to satisfy.
On the install process: even if the total time to install is roughly on par with Yarn, I find that Yarn is much smoother. Whatever they're doing, they're yielding the CPU a lot more, and the result is I can actually work while it installs. npm meanwhile doesn't yield much during install and slows the whole system to a crawl.
Some npm commands are extremely neglected. The "success" message printed by one of the user/permissions related commands is simply: {}
Lastly, I will leave this terrifying comment here: https://github.com/npm/npm/issues/16528#issuecomment-3075400... – note this comment was left 2–3 years after receiving $10M in funding.
I don't blame them for being one-upped by Yarn at every turn, but they still fail to get the basics right, let alone innovate on things.
Re: Yarn's Future – v2 and beyond
#227If you use the yarn cli and have tried the npm cli recently, why do you still use yarn? Are there big gaps that you find that NPM has failed to close?
Edit: also, in my experience using npm for some little stuff recently, yarn is still faster installing packages.
Edit2: I also like the ability to run scripts/commands from the base level of command, e.g. `yarn start`, `yarn webpack --mode production`, `yarn build:web`
Re: Yarn's Future – v2 and beyond
#228The addition of vulnerability scanning was the only reason our company switched back to npm from yarn. Other than that, yarn offers a great experience
Yarn has this too (although it uses the NPM audit database): `yarn audit`.
documentation; https://yarnpkg.com/lang/en/docs/cli/audit/
original feature issue: https://github.com/yarnpkg/yarn/issues/5808
release comment in that issue: https://github.com/yarnpkg/yarn/issues/5808#issuecomment-441...
Re: Yarn's Future – v2 and beyond
#229I've got to say I'm not a big fan of some of these changes and I think they're biting off more than they can chew. > Writing posix command lines inside your scripts field will work regardless of the underlying operating system. This is because Berry will ship with a portable posix-like light shell that'll be used by default. > Scripts will be able to put their arguments anywhere in the command-line (and repeat them i…
I don't see the need for PHP, because composer is one of the few things I like about it. And I don't know enough about Ruby to have an opinion there. But something for Python that actually works? Yes, please!
Re: Yarn's Future – v2 and beyond
#230Yarn has over 1500 open bugs. Rather than working on changes, it'd be nice to stop and address these.
So I'm not sure you can glean too much from just looking at an issue count in isolation.