I'd be curious your thoughts on flow vs typescript. I'm trying to decide for a new project.
-
-
-
I'm still getting past the Flow learning curve so anything I'd say at this point wouldn't be fair to Flow.
-
I will say that I quite miss: implements, abstract class, private/protected, interface inheritance, 1/
-
single namespace for types/values, parens-less syntax for casts, type overloading 2/2
End of conversation
New conversation -
-
-
Some sort of syntax separator is required - they all have their problems I expect. Is there a better alternative to ‘:’ ?
-
The fact that function foo({ x: string }) (and other forms of destructuring) doesn't work is a good enough reason to abort for me.
-
and I say this as a daily user of TS and Flow (really). It's a huge pain point.
End of conversation
New conversation -
-
-
What are the problems you notice with it?
-
function foo({ x: string }) is a massive, massive fail.
-
True... Without running/checking it, I currently have no idea how that'll be represented.
-
in TS and Flow, it's function foo(options) { let { x: string } = options; } (not what you want)
-
Right... No problems with `let x = [ ]; foo({x: Array})`? or something similar, when the right-hand side can be a type or value?
-
that isn't so bad in TS, because `:` isn't used for casting. potentially ambiguous with foo({ (x: Array) }) in Flow-not so bad
-
Thanks for the explanations :)
End of conversation
New conversation -
-
-
blame Flash and ActionScript
- End of conversation
New conversation -
-
-
I use TypeScript a lot and : for types gets a bit awkward around things like destructuring.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
I'd say that {foo as bar} = opts; is way more readable for destructuring than ':'. Like with imports. {foo: string as bar} works too
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
it does work for 10 years now in AS3, now a bit too late to change it. Not because of AS3 but already adopted by TS/Flow
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
is there any web resource that explains why? I think people would appreciate that a lot, many ppl includig me keep asking why 1/2
-
and it's difficult to follow the ideas while browsing the tweet thread 2/2
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.