3 ms·
I like Typescript, however it leads to that "Enterprise Javascript" coding style I really hate, pushing OOP Java style over simple functional programming. But
by aikah 11y ago
I like Typescript, however it leads to that "Enterprise Javascript" coding style I really hate, pushing OOP Java style over simple functional programming.
But I admit that being able to read type signatures in the source code makes understanding a code base way easier, it's just that people tend to be more verbose going full OOP , even when it is not necessary. But kudos for Microsoft, if only they would have accepted ES4 8 years ago, TS would not have been needed.
And by the way Microsoft, why not make Jscript.net cool again ?
- dangoor 11y agoI don't see how TypeScript leads to "Enterprise JavaScript" any more than ES2015 does, given the new class syntax. If I was writing TypeScript, I'd be using functions and simple objects.
- threatofrain 11y agoTypeScript is a superset of EcmaScript, and adds nothing new except for types. Only exactly that.
- andreime 11y agoIt helps people who don't know JS code for JS. And it helps people like c# / java devs just writing code without learning more that typescript. This is very powerful but it also can lead to Enterprise-like code writing.
- WorldMaker 11y agoThe great thing about multi-paradigm languages is that you and I can write very functional code one day and lend a hand in a heavily OOP codebase the next. Even "Enterprise JavaScript" is a step up from the hodge podge "no paradigm" JS that has classically littered the web. It's nice seeing actual architecture and planning in JS codebases these days, with and without the big rigid frameworks. Sure, a lot of it is more verbose than it needs to be and over-architecture is an easy over correction to make, but typically I'll take over-architecture over no-architecture any day of the week. (Even if most of the joy I get from over-architecture is taking sledge hammers to it and reducing it down to a tighter core. Net negative lines of code refactors are a wonderful thing.)