If TypeScript still is a fad at this point, his definition of fad is far lengthier than mine is.
I'm fairly sure TypeScript will remain in popular use longer than whatever project you're working on π
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Follow the wormhole through a path of communities !webdev@programming.dev
If TypeScript still is a fad at this point, his definition of fad is far lengthier than mine is.
I'm fairly sure TypeScript will remain in popular use longer than whatever project you're working on π
As long as JavaScript is being used, TypeScript will be used. It makes writing JavaScript tolerable.
Imo they'll add typing to vanilla js, which will kill ts.
And the ts devs support this
And I'm sure Microsoft would be happy to not have to do it anymore. And I personally would much prefer an actual typing system rather than a glorified linter.
Tho I wonder if it will end up being like jQuery, in the sense that, by the time core jQuery features got added to vanilla js, jQuery had developed new features that validated its continued existence. Maybe TS will go further than what gets absorbed into JS and keep it alive.
TypeScript might not be here to stay, but typed JavaScript definitely is. Iβve switched to writing 100% TypeScript, and havenβt looked back. The fact that just adding types to one of my (admittedly more complex) libraries surfaced 3 unknown bugs was eye opening to me.
CoffeeScript was a fad, but TypeScript seems to gaining more and more popularity these days, with new runtimes like deno supporting them natively. TypeScript finally gave Microsoft relevancy again in webdev world, so I bet they'll go a great length to make sure it stays that way. If Microsoft were still making their own browser engine, I bet they'll make it natively supports TypeScript too.
CoffeeScript was a fad because it didnβt solve anyoneβs problems. It was basically βlook how cool code you can writeβ.
TypeScript is gaining popularity because static typing solves real problems. Itβs also a superset of JavaScript instead of being a completely new language from scratch, which makes it easier for JavaScript devs to learn.
it felt to me like coffeescript solved problems that people had, then js got equivalent features. arguably that could happen to ts as well
Exactly, it was pretty useful until ~2015 imho. Then JS got better, and coffeescript did not follow these evolutions.
CoffeeScript wasn't a fad, it just became obsolete because JS adopted the syntax sugar CoffeeScript was selling. In a way, it did its job.
A fad? No, definitely not. TypeScript brings features (and structure) that will /should probably make their way into JS.
It's sort of like asking, "does SASS replace CSS" or "is liquid the next HTML?" They're just implementations of features FE developers want in the core spec of JS, CSS, and HTML.
that will /should probably make their way into JS.
Not really, IMHO. The main advantage of TS is that it will help you catch errors without having to run a particular piece of code - i.e. you won't have to move to the third page of some multi-page form to discover a particular bug. In other words, it helps you catch bugs before your code even reaches your browser, so it doesn't bring you much to have them in the browser.
(There is a proposal to allow running TS in the browser, which would be nice, but you'd still run a type checker separately to actually catch the bugs.)
5 years ago everything was moving to TypeScript. Now everything has moved. Developers are still catching up, but it will be one-way traffic from here.
I'm guessing your manager thinks TypeScript is like CoffeeScript. It is not like CoffeeScript.
Also, TypeScript is only the beginning. In the halls of the tech giants most devs view TypeScript as a sticking plaster until things can be moved to webassembly. It will be a long time until that makes any dent in JS, but it will also be one-way traffic when it does.
Typescript makes writing Javascript a reasonable thing to do. Your manager is a fad.
Your manager is a fad.
If only...
When anyone in a professional setting says they don't like having a mega corp supporting something I lose a bit of respect for their opinion tbh.
Yes we all know mega corps suck.
But if you're using anything in a professional production environment that is meant to last in the long term this is 100% what you want.
No, because raw-dogging JavaScript isn't something grown-up software shops do.
Javascript is a fad, we should all move to WASM. π
But no, TypeScript is not a fad. Unless a better "Typescript like" thing comes out - I know how in frontend land people like to make their own substitute framework that does something slightly different than an existing framework - But I don't really see why anyone would want to make a NewTypeScript, and not just expand existing TypeScript
No. Dynamic typing, though, is absolutely a fad.
Dynamic typing is not a fad.
Python is older than Java, older than me. It is still going strong.
Hi, I've been doing TypeScript in my day-job and hobbies for six and a bit years now. I would not write JS in any other way.
TS is also a superset of JS so all JS is valid (unless you turn on strict
mode). So there is no productivity loss/learning curve unless you want there to be.
In fact, a lot of people who think they're not using typescript are using it because their editors use typescript definitions for autocomplete and JSDoc type signatures are powered by typescript.
I'll riot if I ever need to write pure js again. 98% of web devs would be better served writing in TS. If you're actually knowledgeable enough to write more efficient js, more power to you but honestly I was probably being generous saying 2% of web devs fall into that category.
I believe both are true... and I also develop a LOT in Angular (with TypeScript).
TypeScript is great but the thing is that if you look at the history of TypeScript and JS/ECMAScript you'll find out that TypeScript sometimes is the testing ground for the future features of ECMAScript - pretty much like what happens with Sass and CSS that how even has nesting and scopes.
The issue with TypeScript/Sass etc. is that it requires a compiler and that's totally obnoxious and completely defeats the point of having interpreted code on browsers. Depending on the project it might be better to go for TypeScript + Angular/React or other compiled solution or simply something vanilla with jQuery or the Vue runtime (no compilation) and other libraries.
If TypeScript ever goes away the underlaying features that make it great will be implemented in ECMAScript in the same way that we got modules, classes etc. and I really hope it happens. Less compilation usually equals code more maintainable in the long run because you won't require hundreds of dependencies (that will eventually break) to get it to compile.
I hope not. I'm pretty sure me and my coworkers would be at each others' throats if it were not for some form of typed JS holding our Frankenstein codebase together.
Imagine changing your file extension from .js to .ts and calling it a fad. JS is TS. The difference is that TS does more (by actually doing stuff before runtime as a static analyzer, similar to eslint). If TS is a fad, then modern web dev is a fad.
Which, to be fair, it is.
Typescript is the only way I can agree to code in Javascript. And the only way you can have a sane project without writing double or triple the amount if unit tests for each function just to check things that a compiler would do. However it is absolutely a lipstick on a pig thing with confusing behavior sometimes, but thatβs because the underlying language it is trying to make bearable is bonkers
I don't think it's going away until ECMA supports native types. Until then it's the best game in town.
If a team decides to move away from it, it's only few hours work to entirely remove. So even if it's going away, it's risk free until then.
But I cannot imagine why any team would elect to remove Typescript without moving to something else similar. Unless it's just a personal preference by the developers who aren't willing to learn it. It removes so many issues and bugs. It makes refactoring possible again. I think teams that want to remove all types are nostalgic, like a woodworker who wants to use hand tools instead of power tools. It's perfectly fine, and for some jobs it's better. But it's not the most efficient use of a team to build a house.
Technicalities aside, TS is being pushed by MSFT in their SaaS custom components, and that right there will keep it relevant a while. MSFT is known for changing names a lot, but not for killing technologies.
After over 5 years of writing TS, I have had to do plain JS sometimes, and it is scary. It feels like walking blindfold. I'm spoiled.
A language that helps me write Javascript without writing Javascript? Nah, that ain't no fad, that's a grace from whatever god is up there.
What's the point of calling something a "fad"? If the technology works well and it provides value to you, why should you care what other people think?
(Example: Look at PHP)
The point of calling something is fad is a way to tell you that you shouldn't invest a lot of time into this because that knowledge will become obsolete soon.
I mean this is particularly relevant in the JS world because every week there's a new revolutionary framework that renders the previous framework obsolete. (Although, not sure if that's slowing down now...)
In a small company with a non-complex product, there is a chance that TS creates more slowdowns than not.
In a large company with multiple cooks in the kitchen and a complex product, I'm personally of the mindset that there is substantial gain from typescript. I've had coworkers tell me it's bullshit, and then I do the smallest lift possible to convert and the amount of bugs it reveals are insane.
Is it necessary? No, probably not. But unless everyone's a 10/10 dev working on the world's simplest product, why not just do it and enjoy the benefits?
INB4 JavaScript blahblah, yeah I've added type hints to pure JS projects too and discovered bugs. At this point I don't get it. Typical resistance I get is that it's too prescriptive and lacks JS's dynamic nature - well, fuck off, I don't want to read through 200+ lines of code where you're changing types and shit on me willy-nilly.
Your manager is an idiot.
They already said he is a manager, no need to repeat
after reading the title I thought he'd suggest something better than TS would take its place, but going back to JS? nah
Based solely on gut feel, I think Typescript will become less popular as Wasm grows
When will Wasm grow, according to your gut? I feel like I've been waiting for a decade now.
I don't see it dying from my perspective. Its only been getting better and better. The only thing I could see displacing it in my org is maybe Rust due to WASM proving a transition path.
We use TS on the back end to leverage our teams existing skill set and libraries we've built up.
I know it's a meme to use "the next best thing" in the ecosystem, but we've been really happy with the newish Effect library + Bun runtime. Effect is like a merger of the older fp-ts/io-ts libraries (same author works on both) with Zio from the Scala ecosystem. It vastly simplifies the former and the new stuff with dependency injection and defect management is refreshing. With the Bun runtime, we see a 15x faster startup time (great for dev). Its halved the RAM requirements in prod. We don't even need to transpile... We still do for prod to tree-shake dev-only code to ensure its not available in prod, but deploying to dev is FAST.
Wow, he's living in 2012 or whatever. A true time traveler.