Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Facebook was using Flow at the time and even though they couldn't have predicted the convergent evolution that produced Typescript nor the tide winds that would have pushed Typescript to prominence over Flow, they still designed JSX for static types from the beginning.

Even the predecessor tech I mentioned E4X, which were the XML extensions to ECMAScript 4, the "lost" JavaScript version, were built on static typing. The most controversial feature that killed ES4 was static type hints. ES4 never directly showed up in browser support, but it did impact web development as ActionScript inside Flash and ES4 had influence on Typescript's syntax. (In some fun ways JSX with Typescript is almost a "Revenge of ES4". It's a lot better than what ES4 would have been, but it's so heavily influenced by ES4 there's a family resemblance and clues that language design is always more evolutionary than revolutionary.)

(Not to mention that the functional programming languages like OCaml and Haskell which inspired the "MVU" patterns are all about strong static typing.)



Flow "early version" (0.1.0) was released in 2014.

Now there's a chance that they had another version used internally at least 3 years prior, but at this point we're just speculating.

But IIRC nothing in React docs at the time mentioned how great JSX is with static types. It was all about render functions.

For now I'm sticking to Occam's Razor and the idea that JSX was a hack to make render functions usable.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: