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

Go over Rational section #27

Open
lukescott opened this issue Jun 12, 2015 · 6 comments
Open

Go over Rational section #27

lukescott opened this issue Jun 12, 2015 · 6 comments
Assignees
Labels

Comments

@lukescott
Copy link
Owner

I think there are some things we can do to make that section a bit easier to read. I also think we can word "type hint after the thing it modifies" a little better, although I'm not sure exactly how to word that yet. Perhaps the thing is reference? Or something.

Also should probably tone down the mention of TypeScript as much as possible. I think flow is closer to what we're trying to do, so citing that more is probably better. I tried doing that in the Motivation section - mentioned TypeScript as an alternative language to using JavaScript because it doesn't have typing. At least that's what I was going for. I probably could have made that a little nicer.

I'm also not sure if ActionScript is all that relevant, besides a footnote.

@Naddiseo
Copy link
Collaborator

That, "thing" is a place holder for a better word that encompasses "variable", "function", "method", "object value", "array value". Yes, "reference" may be better: "type hint after the reference it modifies" or maybe: "type hint after that which it modifies".

I can agree to that. Perhaps they should be footnotes, and we use generic language to refer to them.

@lukescott lukescott added the todo label Jun 12, 2015
@Naddiseo
Copy link
Collaborator

I mentioned ActionScript because (if my memory serves) it's the first javascript derivative that added types to the language.

Hoever, I also think the ECMAScript 4 reference should stay, even if flow and typescript become footnotes.

@Naddiseo
Copy link
Collaborator

Quoting myself from #4, I think we can add a prose version of the following to the rationale section:

  • Many developers agree there is need for type hinting. (Evidence: we have JSDoc)
  • Many developers agree there is need for type checking. (Evidence: we have closure compiler, typescript, flow, Actionscript)
  • Many developers agree there is need for strong type checking. (Evidence: typescript, flow, closure all support strong type checking with generics/templates, type aliases)
  • From Relavant TC39 discussion #17: "Not proposing a type system. Implementors are interested in standardizing JSDoc..."
  • From Relavant TC39 discussion #17: "TypeScript is the strongest proposal at this point. Guards have serious problems for structural types. A sound type system (for JS) is still an academic research topic without a solution in sight."

@Naddiseo
Copy link
Collaborator

Or, we add an FAQ section/file with the above. I also think your thoughts section in #4 (comment) could be used in an FAQ/Rationale, particularly the Array, and "type aliases" parts.

@lukescott
Copy link
Owner Author

I would rank each importance wise:

  • 10 - flow: It's typing on top of JavaScript. Facebook is a big company with a lot of code. Big influence.
  • 5 - TypeScript: It's practically a new language. Which people use because JavaScript doesn't having typing of any kind. TypeScript is a cry for help. I mean Microsoft was like screw this, we're doing our own thing. And Angular team from Google decided to use it.
  • 5 - ECMAScript 4 - A prior attempt. Very notable.
  • 1 - ActionScript - Not really relevant to JavaScript at all. It's Flash/Flex, isn't it? Other than the syntax is very similar.

I think the top two should be mentioned once. We should probably just link the last two. Should also link the notes linked in #17. Although there are other stuff in that document not related to typing. Would be nice if we could show only the relevant notes. Perhaps another doc w/ a link back to the original?

Last 2 comments above, sounds good.

@Naddiseo
Copy link
Collaborator

Sounds good. Something like: "there is typing in flow, typescript, and in an abandoned spec[0] which all were inspired by a predecessor[1]"

As for notes, we could probably quote the section we need, and cite the source.

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

No branches or pull requests

2 participants