News for hackers. Stuff that matters.
Re:A First Reason React App for JavaScript Developers by yebyen on Friday June 23, 2017 @04:04PM (#14622311)
Does it really stay in JavaScript though?

I'm not familiar with the latest ECMA and standards updates and I suppose I don't really know what modern JS actually looks like, but the example on this page[1] doesn't look like syntactically valid JavaScript to me.

If you write code that has to be compiled before it turns into JavaScript, there's another benefit though... it's that you can never accidentally promote code to a server that hasn't already been vetted by the type-checker!

Or, even run it locally! You are guaranteed that the type checker has been run before the code hits a runtime environment.

Looking at Flow, I'm seeing there's a tool `flow` that you run any time you want to check the types. I think there's a background process way to run flow, that mitigates this issue somewhat... but if Flow is in fact implemented to always be syntactically valid JavaScript, that could be a bad thing.

[1]: https://flow.org/en/docs/usage/

Re:A First Reason React App for JavaScript Developers by Raphael on Friday June 23, 2017 @11:57PM (#14624294)
Babel has a bunch of extensions to JavaScript that are widely used. Sounds like it just finds and strips out type annotations.

https://babeljs.io/docs/plugins/syntax-flow/

https://babeljs.io/docs/plugins/transform-flow-strip-types/

Re:A First Reason React App for JavaScript Developers by hazza1 on Friday June 23, 2017 @04:34PM (#14622539)
Realtime checking is trivial with the appropriate IDE extension and you can always put the type annotations inside comments -

https://flow.org/en/docs/types/comments/

Re:A First Reason React App for JavaScript Developers by Touche on Friday June 23, 2017 @04:54PM (#14622703)
No, Flow is not JavaScript, it's a superset.