A typed dialect of JavaScript.

Joined November 2014
Include

Only show posts containing:

Exclude

Hide posts containing:

Time range
-
Minimum likes
Flow is now written in Rust 🦀 The migration from OCaml to Rust brought up to 2x faster type-checking on large codebases.
2
20
Most of the Rust port was done by a single engineer over ~8 months, while the rest of the team kept shipping features: no code freeze. Read the full story: medium.com/flow-type/flows-o…
6
5
4
80
24,863
Flow is now written in Rust 🦀 The migration from OCaml to Rust brought up to 2x faster type-checking on large codebases.
29
67
42
618
249,006
Replying to @justboriss
Yes, you can fix it by changing the code. If only there was a tool that would point out the problem in the first place - so you knew you had to make the fix 🤔
2
706
Replying to @vpetryniak
Doesn't seem like a good assumption 😬
2
782
Replying to @jaydenfyi
Exactly, better to have your type-checker actually enforce you're doing the right thing and prevent your app from crashing! The actual Flow error message is longer and describes: - Either make `Array<string>` and `Array<LogLine>` the same - Or make array a `ReadonlyArray`
4
847
TypeScript lets you pass Array<string> where Array<string | Error> is expected, so the function pushes an Error to your string array. Flow rejects it. TS Playground, 0 errors: typescriptlang.org/play/?#co… Flow Playground, rejects with an error: flow.org/try/#1N4Igxg9gdgZgl…
3
18
4,990
Crashes at runtime - but TypeScript accepts it: zero errors under strict. Can you spot the bug?
17
5
2
99
29,888
👀 Is this Flow, or TypeScript? Is Flow coming back? - Flow syntax aligns with TypeScript - Flow has pattern matching - Useful React hooks/component/renders syntax - Compiler has been recently ported to Rust I'll keep an eye on it for you, but this is promising!
8
5
1
137
22,508
Another: TypeScript only validates the signature of a type-guard, not the body. Flow validates the body and rejects predicates that lie about what they check.
2
1
11
1,459
Where the two still diverge, Flow keeps the stricter, safer default. Extract a method off an instance and it loses its 'this' binding. TypeScript lets the extraction through, so tick() crashes without a valid 'this'. Flow rejects it right where 'this' is lost.
1
1
8
580
First-class component syntax for React. 'renders' types compose through wrappers - MainHeader renders Header slots anywhere a Header is expected, and unrelated elements are rejected.
3
1
10
597
Flow also has features TypeScript lacks. Pattern matching as an expression. It's exhaustively checked, with structural patterns that destructure as they match. Forget a case, like 'remove', and match flags it and tells you what to add.
2
1
8
809
TypeScript or Flow? You can't tell. Flow has keyof, readonly props, unknown, indexed access types T[K], and extends generic bounds. Plus conditional types, mapped types, and type guards.
1
2
9
1,182
If your "Flow vs TypeScript" take is from 2021, it's out of date. Flow looks like TypeScript now - but it has pattern matching and React component syntax, while catching runtime crashes TypeScript waves through. Examples below. 👇
2
10
5
46
7,674