News for hackers. Stuff that matters.
Re:Fable: F# to JavaScript compiler by WaxProlix on Sunday October 29, 2017 @09:18PM (#15582523)
I have to agree, the pragmatic and thoughtful approach that the TS team has brought to the language makes it reasonable to write in and easy enough to reason about at any given time. Plus, being a superset means that if you want to 'drop into' JS to take advantage of some quirk or whatever at any time, you can just disable your linter and do the deed.

Coming from a C# and Python fan, TS hits the mark pretty solidly on all levels.

Re:Fable: F# to JavaScript compiler by BigJono on Monday October 30, 2017 @02:18AM (#15583381)
> Plus, being a superset means that if you want to 'drop into' JS to take advantage of some quirk or whatever at any time, you can just disable your linter and do the deed.

This is an exact example of what GP was talking about with leaky abstractions though. You don't have to just learn TS to use TS, you need to learn TS and JS.

IMO a proper, strict typed language; and plain Javascript; are both much better options than TS.

Re:Fable: F# to JavaScript compiler by Osiris on Monday October 30, 2017 @03:36AM (#15583559)
> You don't have to just learn TS to use TS, you need to learn TS and JS.

I don't understand this. TypeScript is not a different language. It's just JavaScript with some type annotations. If you had never used JavaScript before and learned TypeScript you could immediately write plain JavaScript as well.

Re:Fable: F# to JavaScript compiler by isaacabraham79 on Monday October 30, 2017 @05:15AM (#15583809)
Typescript has grown into way more than just "JavaScript with some type annotations". It's a much bigger superset with lots of language features that JS doesn't have.
Re:Fable: F# to JavaScript compiler by TeMPOraL on Monday October 30, 2017 @05:20AM (#15583819)
TS is not a leaky abstraction; TS is no abstraction at all. It extends JavaScript, not alters or replaces it. As a result, all JS is automatically valid TS.
Re:Fable: F# to JavaScript compiler by dep_b on Monday October 30, 2017 @12:16PM (#15586190)
Well I'm perfectly fine with something what languages like C++ or Objective-C are to C since the whole C interface is still available. If I have a problem in the C layer I can touch that directly and fix it. But I don't think it's possible to mix F# and JS code in the same code file without doing really ugly stuff.
Re:Fable: F# to JavaScript compiler by MangelMaxime on Tuesday October 31, 2017 @06:13AM (#15592069)
In fact, Fable interop is a really powerful one.

If you want to make your own opinion, we have a really good guide here: https://medium.com/@zaid.naom/f-interop-with-javascript-in-f...