Grommet: Suggestion: rewrite grommet on typescript

Created on 15 Sep 2017  路  4Comments  路  Source: grommet/grommet

Because

  1. its hard to maintain type definitions in non typescript projects
  2. You can generate pretty much whatever you like js using different targets. Use target: esnext with jsx: react-native to generate codebase indistinguishable from the present.
  3. it can facilitate flow typings generation using flowgen
  4. And ... grommet written on typescript ... you know, its better)
  5. @RyanCCollins doesn't mind

What thinking the rest of the team?

Most helpful comment

Personally I'm not a big fan of "typed" frameworks for javascript. I like the flexibility of the language and I feel es6 solved a lot of my frustrations with prototypical inheritance (classes, arrow functions).

We try to stay as close as we can to Javascript so that we know what is going on and what the browser will deal with. We try to be careful when using Babel plugins for the very same reasons.

I believe we should definitely support TS bindings, no matter how difficult it will be, we should provide them. But, personally, I don't see Grommet source code written in TS.

Thanks for bringing this topic @BjornMelgaard.

All 4 comments

Thanks for filing this @BjornMelgaard! I'm interested to see how this conversation unfolds. The team is divided when it comes to switching to a typed a language, the majority of the core team do not use TS or Flow. While I do agree Typescript is far superior to Flow unless the whole core team is on board to do this I don't see it happening. Not to mention Grommet 2.x is well into development without types.

Personally I enjoy writing code quickly without types as we're all pretty busy on various projects it's important we can extend Grommet efficiently without wrestling types. As @RyanCCollins can attest we had a pretty crappy experience using Flow for our last project which ended up costing us a lot of extra time, this makes me even more hesitant. I come from a design background with no traditional CS education. I tend to work in a more creative approach when writing code versus what I would assume would be a traditional CS grads workflow. With that perspective I feel types slow me down more than devs whose foundation was in typed languages like C.

Ideally teams working on large JS projects should be using a typed subset of JS but I'm not confident it's right for our team at the moment. With the rise of Reason I would predict in the next few years all of our React projects will be typed. I know @RyanCCollins is working on Typescript bindings for Grommet 2.x so that's a plus for the TS community. I'll leave this open for the rest of the team/community to chime in.

Personally I'm not a big fan of "typed" frameworks for javascript. I like the flexibility of the language and I feel es6 solved a lot of my frustrations with prototypical inheritance (classes, arrow functions).

We try to stay as close as we can to Javascript so that we know what is going on and what the browser will deal with. We try to be careful when using Babel plugins for the very same reasons.

I believe we should definitely support TS bindings, no matter how difficult it will be, we should provide them. But, personally, I don't see Grommet source code written in TS.

Thanks for bringing this topic @BjornMelgaard.

This should be tied to #1512

Yup, dup.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

blakehilliard picture blakehilliard  路  3Comments

webdeb picture webdeb  路  3Comments

nnbrandon picture nnbrandon  路  3Comments

RyanCCollins picture RyanCCollins  路  3Comments

ezu picture ezu  路  4Comments