Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decide on source language #4

Open
bvaughn opened this issue Mar 2, 2015 · 9 comments
Open

Decide on source language #4

bvaughn opened this issue Mar 2, 2015 · 9 comments

Comments

@bvaughn
Copy link
Member

bvaughn commented Mar 2, 2015

Let's pick a source language: (vanilla) ES6, TypeScript, ATscript, Dart, annotated Closure or Flow, etc.

My personal vote at this point would be to go with TypeScript. It has fantastic IDE support and the Gulp, Grunt, and command-line tools are very easy to use. (For an example of a medium-sized TypeScript project, check out my Task Runner library: https://github.com/bvaughn/task-runner)

I dislike the annotation syntax used by Closure and (the newest flavor of) Flow because I think it adds a lot of vertical bloat to the source code.

ATscript is syntactically similar to TypeScript but I haven't used it. Dart is also okay, although I think its support and community usage is generally considered lower than TypeScript.

Thoughts?

@mchapman
Copy link

mchapman commented Mar 3, 2015

For me the choice is about trading off utility and confidence in community adoption. And plugging my educated guesses into my informal maximisation function I see that ES5 < ES6 < TypeScript. Thereafter things get much more hazardous. I would take a punt on ATscript if we were targeting Angular, but not sure we should if the target is more general.

@mohsen1
Copy link
Member

mohsen1 commented Mar 3, 2015

One thing that we should consider is how this is impacting contributions. I don't have the numbers but I'm sure there are less people familiar with TypeScript and Dart vs. JavaScript.

I don't mind TypeScript. The type system will prevent me shooting myself on the foot

@kentcdodds
Copy link
Member

I vote ES6 actually. TypeScript is way cool, especially when working with teams. However I feel like it could be a barrier to people contributing PRs. People are (will be) much more comfortable coding ES6 than TypeScript. Also, if we use apiCheck to do run-time validation of our external apis (and even some of the internal ones) that should help with maintainability.

@bvaughn
Copy link
Member Author

bvaughn commented Mar 3, 2015

Impact on contributors is a good point. Fortunately TypeScript is very easy to read for JS developers (probably even more-so than Dart). IMO, it's worth the trade-off to gain the additional compilation checks.

Also worth pointing out that TypeScript does support a mix of TS and vanilla JS, meaning that people could technically contribute code without any type annotations (and we could add them after the fact).

I haven't checked out apiCheck yet, but I'd initially be a little concerned about runtime validation adding overhead and impacting performance.

@mchapman
Copy link

mchapman commented Mar 3, 2015

I think the people we would lose by going with TS would only be the ES6 developers who have decided against TS (as opposed to those who have just not used it yet). My guess is that this is small constituency.

And TS can sort-of validate PRs in JS anyway (not sure about the tooling requirements here), as it infers types in a clever way, so the only problem they would have would be reading existing code, and as @bvaughn points out it is pretty readable.

@bvaughn
Copy link
Member Author

bvaughn commented Mar 3, 2015

Probably worth pointing out that we'd probably only be "losing" those people as potential contributors, not as end-users.

@bvaughn
Copy link
Member Author

bvaughn commented Mar 5, 2015

Regarding TypeScript vs AtScript: http://blogs.msdn.com/b/typescript/archive/2015/03/05/angular-2-0-built-on-typescript.aspx

Looks like the AtScript-added features will be merged into the next release of TypeScript. In my mind, this really narrows down the choices to Dart and TypeScript. Given the syntactic similarity and interoperability of TypeScript and JavaScript, my vote remains TypeScript. :)

@mohsen1
Copy link
Member

mohsen1 commented Mar 5, 2015

I vote for TypeScript after this announcement :)

@davidlgj
Copy link

davidlgj commented Mar 5, 2015

Oh yes. Between dart and typescript its definitely typescript.I'm still up for plain ES6, but typescript do look promising :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants