GithubHelp home page GithubHelp logo

Comments (2)

yungsters avatar yungsters commented on April 25, 2024 1

Thanks for your question, @jsdario.

At Facebook, we use Flow for type-checking (almost) all of our JavaScript. We generally do not add support for proposals until they are beyond the experimental phase (which I believe is roughly defined as "Stage 2"). Adding support for the existential operator proposal is slightly more involved because it involves changes to not only Flow, but the parser.

The proposal was also not even Stage 1 when we initially introduced idx into our codebase. And until it is more mature, we need something that allows us to use this pattern while maintaining support with Flow. The benefit of using a function (even one with somewhat arbitrary constraints) is that the tooling ecosystem (e.g. IDEs, linters, and Flow) already know how to work with them.

Some people have raised the point that even though idx uses valid JavaScript syntax, it still required a custom Flow declaration and Babel plugin. As I mentioned above, the custom Flow declaration was very low cost, and we already have a precedent for Babel plugins that inline code functions in the name of performance (e.g. invariant).

As soon as the existential operator is further along and supported by Flow, the plan is indeed to codemod all call sites of idx at Facebook to use it. When that happens, I'll likely also open source the jscodeshift to do so.

I hope this answers your question!

from idx.

hzoo avatar hzoo commented on April 25, 2024

@jsdario for the first question, you can check the issue I made #1. I believe they just didn't know how far the proposal was and the status of it + Babel. Hopefully, we can have better communication in the future

from idx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.