(no title)
damncabbage | 9 years ago
I'm kind of curious what you've run into personally. Having a dependency without any type-defs get silently treated as `any` is my own beef, but I haven't hit much else yet.
(Some type-defs' use for `any` also gets my goat, such as Promise's catch argument and some of the lodash functions, but I'm considering that a separate thing.)
> And honestly, some of the decisions around the language just feel strange. Not knowing what kind of bool to use [0] is pretty emblematic of where it is going as a language.
This is more an existing JS weirdness (`true`/`false` vs `Boolean()`); Flow doesn't mess with runtime semantics, only adding a layer that you check with then strip out.
And TypeScript has the same thing:
var a: boolean = new Boolean(1);
// Produces:
// NewTypering.ts(29,5): error TS2322: Type 'Boolean' is not assignable to type 'boolean'.
DanRosenwasser|9 years ago
WorldMaker|9 years ago
You can add the compiler flag --noImplicitAny to get errors if you prefer.