Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
avik
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
1.
▲
by
avik
11y ago
It is with Flow.
2.
▲
by
avik
12y ago
Still early days but the reception has been strongly positive. We may be a biased bunch but we like our code mostly statically typed with the flexibility provided by dynamically typed languages. A large part of this culture is due to the im
3.
▲
by
avik
12y ago
The source also has an emacs plugin, named flow-types.el
4.
▲
by
avik
12y ago
It does care about prototypes. So it checks for inconsistencies between methods added to a prototype and their uses. The tradeoff is that for dynamically added properties, it doesn't always remember where they are defined and where the
5.
▲
by
avik
12y ago
Haha, yeah Hacker News didn't treat me well yesterday, so I'm trying to go through questions now and reply to them. :) Thanks for noticing!
6.
▲
by
avik
12y ago
If you can feed inferred static types to something like Google Closure Compiler, you do get performance benefits. Also, if you're code is implicitly statically typed (as checked by Flow) you will likely hit all the right optimizations
7.
▲
by
avik
12y ago
Yes, so the conclusion one might draw is that if your code is implicitly typed, it will run fast as well as probably do well when run through a static type checker.
8.
▲
by
avik
12y ago
One obvious thing to try is to use Flow's type inference to emit GCC annotations and see whether those optimizations kick in. (Of course, Flow can also try to replicate whatever GCC does, but that will take some time. No reason not to,
9.
▲
by
avik
12y ago
Yes, it does. You can define object types like { x: number; y: string }, tuple types like [number, string], function types like (x:number) => string, etc.
10.
▲
by
avik
12y ago
We actually built this because we write a lot of JavaScript at Facebook, and we need a tool like Flow. So yes, we worked on it full-time, with "funding": our developers like to move fast, Flow helps them do that. (It's a diff
11.
▲
by
avik
12y ago
We have some basic editor support, more is coming soon. Flow exposes several commands that are useful through an editor, like type-at-pos (give it a position, it gives you back the inferred type), suggest (give it a file, it dumps out an an
12.
▲
by
avik
12y ago
The implementation is heavily influenced by Pottier's work on subtyping + inference. https://hal.inria.fr/file/index/docid/73205/filename/RR-3483... Also, some techniques from Typed Racket (occ
13.
▲
by
avik
12y ago
No, instead of complaining about 'x' having the 'any' type, Flow will actually try to infer a static type for 'x'. So in the best case there would be no errors (and in the worst case there would be actual error
14.
▲
by
avik
12y ago
Yes, OCaml.
15.
▲
by
avik
12y ago
Hi, I'm Avik Chaudhuri, I'm one of the authors of Flow, and I'll be happy to answer questions.