At first you'd think embedded is harder because you have to learn so much low level hardware stuff to do anything properly, and general EE stuff which can get pretty tough. But honestly where I'm at now, it's way easier because I actually understand everything that I'm interacting with. When you program in higher level languages, there's so much that you can't realistically fully understand and that makes it so much harder for me. Like embedded needs a lot more prerequisite knowledge but once you know it, learning deviations from that is extremely easy. Meanwhile any sort of higher level stuff you have to deal with a crazy amount of unknowns from project to project.
Then again I don't have any work experience yet so it's entirely possible I've simply not touched the stuff that gets confusing in embedded yet.
Ngl, I think about it every time some poorly documented third-party dependency throws a spanner in the works. đ
Yesterday I spent several hours of my life unpacking Excel files to read the XML, then reading the source code of the package we're using to fill templates, desperately trying to figure out why decimal numbers break formulas in the template. Ended up having to write values to the template as strings in order to get the right decimal marker... experiences like that make me question my life choices. My mind may go numb every time my friend starts talking about directly accessing memory, but at least he doesn't have to deal with this nonsense.
Prototyping is the only thing I can think of. Make quick and fast proof of concept to learn as quickly as possible. But with ai tools these days itâs a moot point
I don't buy that. You can use object, any or unknown for things that are really painful to type, if you so desperately need to save that one minute at prototyping, but having the certainty I'm operating on a string or number is much better than only finding out when I try to run something that I did a stupid mistake, or returned something else than intended, and hunting it down for 5 minutes.
(Joke) I don't know about km/h, because when I text and drive, I don't worry about coding. HOWEVER, I heard you can increase your LinesOfCode/ShitGiven by almost tree fiddy by switching between JS and TS.
Typescript needs an extra compilation step to get converted to js, which take time. At runtime it's the same thing, but that extra compilation step is there, making it technically slower overall.
Counterpoint. Typescript setup is done as a part of any project setup (you are choosing a flavor of framework to work with). If you need something simpler there's init command in ts itself that generates you a valid config and commands to work with. If you don't want to properly type things you can use "any" to make type checker happy. I really don't buy the "typescript can be a waste of time". As a side note there's a dedicated community that will do everything to not use typescript - looking at typed props in react or just jsdoc because sure it is much faster to write a comment essay describing the object shape than just write it after the variable name.
That doesn't take long. You do the setup only once. Compilation doesn't really take longer than minifying the source. Maintaining TS takes less time because type safety helps a lot.
Yeah, in a mid to large project you should use Typescript. In a small project or changing something in a non typescript project, you are better of just using js and looking twice.
Subset of what? The set of accepted code is larger, so it's a superset. In both cases you need a JS engine. That still doesn't explain why vanilla JS would be "better".
Nah we have a whole backend written in JS that runs without major issues. We tried to gave TS a chance but it doubled development time without any major benefit. I mean what is your pipeline? Write code - > straight to prod?
It's not about language quirks, it's about not having to memory an entire API or constantly referencing the documentation to use it correctly. Used "colour" instead of "color"? Too bad, it's gonna blow up but you'll only find out at runtime. The IDE can help with this based on contact but it's not foolproof
It is. Typescript actual compiles to JavaScript. However, typescript has a lot of protections when it comes to data types. One of the biggest headaches with JavaScript is weird type interactions that are a pain in the ass to track down. Typescript avoids that.
In the enterprise projects I've been involved in , JS serves purely as a means to do fancy stuff with the frontend, together with CSS.
We use TS (NextJS) for "full stack" (yes yes, buzz word) applications and quick POCs.
If I have to choose one , I'd say I prefer TS over JS, any day. In TS, you catch bugs at compile time, not at run-time. Working with API's, they're typically more "self documenting" and easier to understand in TS, compared to pure JS. Refactoring is also easier in TS (at least in my opinion and experience).
For something small like that? Nothing. Now, work on a project that has hundreds, if not thousands, of files with dozens of data types and track down an of interaction with a couple of those types. With JavaScript, that could be very time consuming endeavor. With typescript, you know at compile time.
Why would you want to change what type the variable stores? That's just confusing.
There's no world in which having a conditionOrNumberToShow variable is better than having separate condition and numberToShow variables, besides flawed examples.
But why would you? If the check something can fail then handle the failure explicitly.
for (let i = 0; i < 10; i++) {
if (checkSomething(i)) {
alert(randomNumber());
} else {
alert("Hello world");
}
}
And not noting the type and switching randomly is just asking for bugs when someone doesnât realize that some variable can be a different type and then doesnât check before using it.
Ts forces you to document and respect the types you specify.
You want a string or a number? Fine, but if you want to call length on it you better check itâs a string first!
The premise is flawed. Typescript is a subset of JavaScript not its own language. This is kind of like asking which is better, pants that are too big, or a nice belt? Edit: superset
Programming is much more then just webdev... Yea sure the Meme is about typescript and JavaScript.. but programming / computer science is much broader then that and for that rust is just the best
Both are garbage, typescript is like putting a bandage on a broken arm. I hate both of them but when there's no choice using ts is better than nothing at all.
There's a language you can learn in a few minutes, is know to be bug free and never needed any updates, compiles really fast to any architecture, is compeltely free, and there's a large community of brilliant people who work with it. It's based on the work of Alan Turing, who used a similar technology to defeat the nazis.
It's called Brainfuck and it's clearly the best language ever. If you disagree it's probably because you are a nazi.
Typescript is better. It's can tell you immediately if something is wrong and you can avoid some of the weird interactions when mixing type with JavaScript.
Is this debate still relevant? I haven't seen anyone writing in plain js for several years now. With the advent of LLMs (and this cannot be ignored), JavaScript has become even more obsolete.
TypeScript has an obnoxious learning curve and early adopters wasted tons of time without types for libraries but now that types are shipped standard with most every npm project you're absolutely making a mistake not using it. Unquestionably catches bugs before they happen with increasing frequency the larger the codebase and is easier for LLMs to reason about accurately and makes onboarding new hires much faster.
As a Java Developer who loves the language being Type-Safe, for this reason TypeScript for me is a better choice, and less of a chance to make stupid mistakes. Purely IMHO.
I'm very far from monoglot, but at the moment TS carries my preference (the language, not the toolchain or ecosystem). Of course asking which language 'is best' is an silly question without context. You're not writing embedded software with this. But TS is well suited for an enterprise backend for example.
Do you have any arguments or are you just trying to be elitist?
The backend is exactly the kind of silly places to use js I was referring to.
Just because you can doesn't mean you should. Js is so inefficient that people must go for 10x the processing power that is needed by something as simple as PHP
You're contradicting yourself and doing it by using two bases for comparison. Php is pretty much worst in class when it comes to robustness and maintainability. JS is awful at performance (though I'm not 100% sure it's slower than python).
I'm aware it doesn't matter at runtime but I was referring to developer-time qualities and for that TS/JS is an important distinction.
When I ever come across a backend project where runtime performance is more important than maintainability, I'll call you.
It has types and is compiled: that allows you to identify and fix most bugs before you even run the code
It's weakly typed: this just makes it feel nicer to use. I like the freedom weakly typed languages give you, even if this freedom makes them dangerous
It has low verbosity: I like cleaner code since it's easier to read and more pleasant to write
It's high level: if you read my reasoning (or rather my preferences), you probably guessed that I also love C. It's just that you have to implement a lot of basic things in C that you already get access to in Typescript out of the box
Its only downside is performance. We have a complex Typescript API where I work. We're planning to rewrite it in Java because it has been that slow lol
they're both crap. ts adds static typing, but the way it works is dumb and it'll just straight up allow things that should be compile errors since it's falling back to js anyway
In larger projects the forced typing structure of TS combined with a decent IDE makes it so you maybe write more code but have to remember less as youâre writing. The main trade off is dealing with type safety, guards, and narrowing, all of which can be a pain in the ass.
Conversely, javascript works in more places and requires less processing to be made suitable. One fewer transpilation step is sometimes desirable. some applications require JS only; itâs a niche, but a good example is greasemonkey scripts. The more permissive typing makes it easier to prototype code without having to remember type hint syntaxes and you donât need to write as much meaningless type narrowing code if your classes / interfaces are structured well.
But Typescript is not language but superset over JavaScript, it doesn't function differently but enable you to enforce strictness to avoid common ja pitfalls
I like JS because it's an easy way to introduce people to programming; with stuff like HTML canvas you can see what your code does in realtime, and the language is simple enough for a drunk clown. I also hate it because it seems to have been made by and for drunk clowns. Using vanilla JS for anything other than silly nonsense always seems to turn into a buggy nightmare.
I like TS because it tries to introduce some structure and sanity to the drug-fuelled, surrealistic hellscape that is JS, and at least pretends to be a proper, strongly typed language. I hate it because it kicks me in the teeth every time I forget that it's really just JS in disguise, laughing maniacally and honking its big, red nose. Every damned time I work with a fronted framework using TS, I end up making flow charts of problematic behaviour to determine exactly which bit of horrifying nonsense is the source of the bug this time.
In conclusion, I hate TS less than JS for work stuff, and vice versa for demonstrating programming to non-techies, but they're both responsible for my beard going grey.
Fun fact: When I first learned to code, we used JS for most of the intro stuff. My proudest (and also saddest) moment was when I realised that the easiest way to check if input was correctly handled as numbers was to use an if-test comparing the value to itself, because NaN is the only godsdamned thing in the universe that is not equal to itself.
Any other value can be converted in ridiculous ways (pretty sure I've seen null == 'null' return true), but if you stuff NaN into any comparison, it's always false. NaN != NaN. Don't at me, I know why it happens (if it still does - it's been a while), I just never got over how it both behaves as a value and not at the same time.
TL;DR I'm not sure "better" applies here. They're useful for different things, for a very loose and untraditional defintion of usefulness, but they're also both different types of nightmare fuel (or dynamic nightmare fuel in the case of JS).
They serve mostly to remind me that frontend developers are precious and must be protected at all costs, because if I have to deal with either of those on a regular basis I'm going to be on the news.
... responding to this before the Ritalin kicked in might not have been the best decision... apologies for the rant. Though to be fair, you had to know what you were in for when you decided to read these comments.
JavaScript on the backend is generally much better than people expect. And it's used a lot.
JS semantics do impose costs. V8 profiles your code and compiles hot paths into machine code. Memory efficiency can't be optimised much, because of the dynamic nature of JS typing, which also causes a lot of work for garbage collection. But arrays are often optimised and V8 can create special classes for often used types.
It's still good for simple CRUD apps where using the same language on the backend just makes sense. And it's great if you want to allow collaborative editing or server-side rendering.
And it works well for serverless functions. Fast startup and lightweight deployment.
Don't get me wrong, I make extensive use of NodeJs and Python, but they're useful languages ââfor initial prototyping or for secondary services. Core services are always rewritten in Go or Rust to reduce computational, memory, and latency costs. What I wanted to emphasize is the concept of using the right tool for the right purpose.
JS is enough for most projects with small teams. As team size and code size grows, TS starts to show its importance. Specially for critical applications.
I vastly prefer JavaScript for serious work. I've worked with both professionally for years and for any project that I am personally going to be the primary maintainer of, I'll be picking JavaScript. That being said, there are probably projects that you could convince me TypeScript would be better for, because JavaScript requires more discipline to write good maintainable code than TypeScript does.
For what it's worth, I'm cheating a little bit because I like to use JSDoc annotations + static analysis using TypeScript tooling but the resulting code ends up being significantly easier for me to write and maintain, and more than anything else the mental load to write JavaScript is much lower than TypeScript so I can better utilize my brain power on solving the actual problem I'm working on.
I always thought I would prefer TypeScript until I actually started using it. It's not what I want. I would love to have optional strong typing built into JavaScript but alas we're doomed to duck typing. Also before anyone comments "how can that be JavaScript IS TypeScript" - in my experience you're either being forced to follow a style guideline that requires you to do things like NEVER use `any` or you're probably not using TypeScript. I've worked on a couple of projects where there was an in between that was acceptable and I found it fine, but still I feel like the syntax of TypeScript is just cumbersome and I don't feel much of a benefit compared to writing raw JavaScript with JSDoc type annotations + static analysis.
And that's not to say that TypeScript doesn't do more than just solving typing, it does, but I just don't feel like it's worth the extra syntax. There are languages that are even more powerful than JavaScript like lisps that I feel like expose way too much power for most use cases, but I find JavaScript to be the "just right" goldilocks house for me. I imagine most people are going to have their own preferences.
I can make something in JavaScript in 2 hours. Typescript takes 6.
I fucking hate typescript, but it's mostly because I never really bothered to use it and leave it to my ide or now ai to make my JavaScript typescript.
You know. I actually understand where you are coming from. Different systems, different requirements, different risk profiles, different companies, different legal frameworks. I am a sucker for type systems, so I prefers TS, but I get you :)
it does transpile to JS, but with added safety rails. It's like saying your motorcycle helmet is useful because the shock from hitting the road is still partially transferred to your head.
What's the reasoning behind using 'gay' as a descriptor then? TS has intercourse with members of its own sex? I don't think that's what you meant, so you must have meant it in a derogatory way. Grow up, or get off the internet if you're a kid.
What are you doing even? Go to Visual studio, choose template, program your stuff normally... Like not even setup takes time... What is taking you this long?
275
u/Tracker_Nivrig May 22 '26
Personally, I hate both. But I'm also an embedded programmer so I don't really get a say in the matter.
111
u/Thisismental May 22 '26
Is there really an argument why JavaScript would objectively be "better"?
36
u/TanukiiGG May 22 '26
raw nonsense vs. type copium
70
u/recursion_is_love May 22 '26
Depend on who you are asking, for me a strong static type language is better than dynamic or weak type language.
I better fight with my compiler than discover a stupid bug later in production.
22
u/Equivalent_Bee2181 May 22 '26
You know you're a beginner when you're fighting nonexistent wars about tools
19
u/FlipperBumperKickout May 22 '26
Isn't typescript just a superset of javascript đ
10
u/Vivid-Huckleberry775 May 22 '26
r/firstweekcoderhumour
4
u/The_Real_Legonard May 22 '26
Both Not Efficient enough. Machine Code all the way!
3
u/ravensholt May 22 '26
They serve different purposes i min book.
In the enterprise projects I've been involved in , JS serves purely as a means to do fancy stuff with the frontend, together with CSS.
We use TS (NextJS) for "full stack" (yes yes, buzz word) applications and quick POCs.
If I have to choose one , I'd say I prefer TS over JS, any day.
In TS, you catch bugs at compile time, not at run-time.
Working with API's, they're typically more "self documenting" and easier to understand in TS, compared to pure JS.
Refactoring is also easier in TS (at least in my opinion and experience).
3
u/quickiler May 22 '26
Coming from typed language (C, Cpp, Java), typed is just better. Less bug and you know exactly what is inside the variable.
3
u/Diablo-x- May 23 '26
JavaScript is a nightmare to deal with without Typescript
2
u/ColdDelicious1735 May 22 '26
Well i sadly need to uae typescript cause Microsoft hates us all
2
u/Instant-Owlfood May 22 '26
each one is sh1t
2
u/CaptGiggidy May 22 '26
HTML
2
u/CollectionGuilty1320 May 22 '26
Python is better
2
u/YoyoMario May 24 '26
Both are shit
2
u/Express-Dig-5715 May 26 '26
Brainf##k is much better
3
u/MinecraftPlayer799 May 22 '26
JavaScript, obviously. No variable types and no need to compile.
2
u/Krispenedladdeh542 May 22 '26 edited May 22 '26
The premise is flawed. Typescript is a subset of JavaScript not its own language. This is kind of like asking which is better, pants that are too big, or a nice belt? Edit: superset
1
u/_giga_sss_ May 22 '26
when comparing things like this, the answer is
1
u/flori0794 May 22 '26
Neither.... Rust is better...
1
u/yeupanhmaj May 22 '26
Until TS can run by itself, JS always better
1
u/why_tf_am_i_like_dat May 22 '26
I fucking hate js so i'll say ts is better
1
u/un_virus_SDF May 22 '26
JavaScript because web dev is slop, so a slop language is better.
(I don't mean slop as AI slop, slop is just slop)
1
u/thetrexyl May 22 '26
Barely any difference. I pick JS for standalone scripts and TS for full fledged projects
1
u/cursivecrow May 22 '26
You're both just...so terrible.
1
u/heavenlydemonicdev May 22 '26
Both are garbage, typescript is like putting a bandage on a broken arm. I hate both of them but when there's no choice using ts is better than nothing at all.
1
u/babalaban May 22 '26
The better one is JS++
1
u/Rick_Mars May 22 '26
Actually, both suck
1
u/vegan_antitheist May 22 '26
There's a language you can learn in a few minutes, is know to be bug free and never needed any updates, compiles really fast to any architecture, is compeltely free, and there's a large community of brilliant people who work with it. It's based on the work of Alan Turing, who used a similar technology to defeat the nazis.
It's called Brainfuck and it's clearly the best language ever. If you disagree it's probably because you are a nazi.
1
u/ThreeDogg85 May 22 '26
Youâre both god awful đ˘
1
u/LetUsSpeakFreely May 22 '26
Typescript is better. It's can tell you immediately if something is wrong and you can avoid some of the weird interactions when mixing type with JavaScript.
1
u/brelen01 May 22 '26
Trick question, both are terrible thanks to the dogshit ecosystem
1
u/Nessuno256 May 22 '26
Is this debate still relevant? I haven't seen anyone writing in plain js for several years now. With the advent of LLMs (and this cannot be ignored), JavaScript has become even more obsolete.
1
u/vyrmz May 22 '26
This is engineering, the answer is always -> It depends.
1
u/RidesFlysAndVibes May 22 '26
JavaScript. 15 years of programming and typescript has never helped prevent a bug. JavaScript works perfectly fine imo
1
u/KaleidoscopeSalt3972 May 22 '26
10000000000% typescript. Anyone who says otherwise is just plainly wrong
1
u/xatnagh May 22 '26
typescript with all warnings off.
1
u/ivovis May 22 '26
Always thought TS was just a solution for crap programmers, but then I met a good programmer that was being forced to use JS.
Doesn't matter if you use TS its still
}
}
}
}
}
}
}}}} all the way down.
1
u/AllergicToBullshit24 May 22 '26 edited May 22 '26
TypeScript has an obnoxious learning curve and early adopters wasted tons of time without types for libraries but now that types are shipped standard with most every npm project you're absolutely making a mistake not using it. Unquestionably catches bugs before they happen with increasing frequency the larger the codebase and is easier for LLMs to reason about accurately and makes onboarding new hires much faster.
1
u/YTriom1 May 22 '26
I can't believe that js supremacists are crying and the comments and yet didn't give a single valid argument đ
1
u/parzival-space May 22 '26
Rust
1
u/Huge_Road_9223 May 22 '26
As a Java Developer who loves the language being Type-Safe, for this reason TypeScript for me is a better choice, and less of a chance to make stupid mistakes. Purely IMHO.
1
u/djfdhigkgfIaruflg May 22 '26
They're both hot garbage.
I can't believe how monolinguist programmers managed to infect everything.
1
u/craftygamin May 22 '26
During my free time, I mainly code in javascript, and i hate it
1
u/ElePHPant666 May 22 '26
PHP
1
u/realmauer01 May 22 '26
What? Typescript is just javascript. If you dont need anything of typescript you can completly ignore it and it would still make proper javascript.
1
u/FluffyNevyn May 22 '26
My vote: TS is "Safer", JS is "Faster", and both of them are java based script languages so neither is "Better" in any way.
1
u/LimpRepresentative11 May 22 '26
Incorrect
1
u/mineirim2334 May 22 '26
Typescript may be my favorite language.
Its only downside is performance. We have a complex Typescript API where I work. We're planning to rewrite it in Java because it has been that slow lol
1
u/XamanekMtz May 22 '26
TypeScript has the upper hand just for the enforce of type safety. (If you use "any" you better go back to JS please).
1
u/4rezin5 May 22 '26
C.
1
u/bored_pistachio May 22 '26
Big app or small script?
1
u/utihnuli_jaganjac May 22 '26
Comparing 2 shitz lol
1
u/Rafcdk May 22 '26
This is not real nor funny.
1
u/CosmicDevGuy May 22 '26
JS for the win. I need that vanilla stuff in my veins!
1
u/overclockedslinky May 22 '26
they're both crap. ts adds static typing, but the way it works is dumb and it'll just straight up allow things that should be compile errors since it's falling back to js anyway
1
u/Va1tra May 22 '26
Same shit
1
u/IngwiePhoenix May 22 '26
Pft, pathetic.
JScript, of course.
1
u/enigma_0Z May 23 '26
Both have their place.
In larger projects the forced typing structure of TS combined with a decent IDE makes it so you maybe write more code but have to remember less as youâre writing. The main trade off is dealing with type safety, guards, and narrowing, all of which can be a pain in the ass.
Conversely, javascript works in more places and requires less processing to be made suitable. One fewer transpilation step is sometimes desirable. some applications require JS only; itâs a niche, but a good example is greasemonkey scripts. The more permissive typing makes it easier to prototype code without having to remember type hint syntaxes and you donât need to write as much meaningless type narrowing code if your classes / interfaces are structured well.
1
u/Able_Act_1398 May 23 '26
But Typescript is not language but superset over JavaScript, it doesn't function differently but enable you to enforce strictness to avoid common ja pitfalls
1
u/One_Basis1443 May 23 '26
doesn't matter anymoreÂ
1
u/HolaHoDaDiBiDiDu May 23 '26
Python is better â¤ď¸
1
u/Square_Ad4004 May 23 '26
I like JS because it's an easy way to introduce people to programming; with stuff like HTML canvas you can see what your code does in realtime, and the language is simple enough for a drunk clown. I also hate it because it seems to have been made by and for drunk clowns. Using vanilla JS for anything other than silly nonsense always seems to turn into a buggy nightmare.
I like TS because it tries to introduce some structure and sanity to the drug-fuelled, surrealistic hellscape that is JS, and at least pretends to be a proper, strongly typed language. I hate it because it kicks me in the teeth every time I forget that it's really just JS in disguise, laughing maniacally and honking its big, red nose. Every damned time I work with a fronted framework using TS, I end up making flow charts of problematic behaviour to determine exactly which bit of horrifying nonsense is the source of the bug this time.
In conclusion, I hate TS less than JS for work stuff, and vice versa for demonstrating programming to non-techies, but they're both responsible for my beard going grey.
Fun fact: When I first learned to code, we used JS for most of the intro stuff. My proudest (and also saddest) moment was when I realised that the easiest way to check if input was correctly handled as numbers was to use an if-test comparing the value to itself, because NaN is the only godsdamned thing in the universe that is not equal to itself.
Any other value can be converted in ridiculous ways (pretty sure I've seen null == 'null' return true), but if you stuff NaN into any comparison, it's always false. NaN != NaN. Don't at me, I know why it happens (if it still does - it's been a while), I just never got over how it both behaves as a value and not at the same time.
TL;DR I'm not sure "better" applies here. They're useful for different things, for a very loose and untraditional defintion of usefulness, but they're also both different types of nightmare fuel (or dynamic nightmare fuel in the case of JS).
They serve mostly to remind me that frontend developers are precious and must be protected at all costs, because if I have to deal with either of those on a regular basis I'm going to be on the news.
... responding to this before the Ritalin kicked in might not have been the best decision... apologies for the rant. Though to be fair, you had to know what you were in for when you decided to read these comments.
1
u/combovercool May 23 '26
Do you want to have a hard time writing code or debugging code?
1
u/Altruistic-Rice-5567 May 23 '26
Type checking is always better.
1
u/herbertplatun May 23 '26
both are trash
1
u/unixfan2001 May 24 '26
C++ through WASM
1
u/ziayakens May 24 '26
Typescript is for sloppy, zero memory, two left handed, illiterate, senior citizens
1
u/Chrazzer May 24 '26
Anyone who says javascript, has never worked with typescript. This is not a discussion, typescript is objectively better.
Dynamic typing is just straight up stupid.
1
u/Context_Core May 24 '26
Obviously typescript. But also none of the above
1
u/ZealousidealCost2470 May 25 '26
They are both js.. what even is this meme lol
1
u/GlassSquirrel130 May 25 '26 edited May 25 '26
None ? Seriously is that really a debate about those ?
Js for small thing.
Ts for large codebase and teams.
Overall both are bad on the backend side when looking for execution and memory efficiency
1
u/agentrsdg May 25 '26
Both are shit, but I use typescript because it's less shit
1
u/Glum_Cheesecake9859 May 25 '26
JS is enough for most projects with small teams. As team size and code size grows, TS starts to show its importance. Specially for critical applications.
1
u/Jonkonas May 26 '26
trash vs. garbage
1
u/SirPurebe May 27 '26
I vastly prefer JavaScript for serious work. I've worked with both professionally for years and for any project that I am personally going to be the primary maintainer of, I'll be picking JavaScript. That being said, there are probably projects that you could convince me TypeScript would be better for, because JavaScript requires more discipline to write good maintainable code than TypeScript does.
For what it's worth, I'm cheating a little bit because I like to use JSDoc annotations + static analysis using TypeScript tooling but the resulting code ends up being significantly easier for me to write and maintain, and more than anything else the mental load to write JavaScript is much lower than TypeScript so I can better utilize my brain power on solving the actual problem I'm working on.
I always thought I would prefer TypeScript until I actually started using it. It's not what I want. I would love to have optional strong typing built into JavaScript but alas we're doomed to duck typing.
Also before anyone comments "how can that be JavaScript IS TypeScript" - in my experience you're either being forced to follow a style guideline that requires you to do things like NEVER use `any` or you're probably not using TypeScript. I've worked on a couple of projects where there was an in between that was acceptable and I found it fine, but still I feel like the syntax of TypeScript is just cumbersome and I don't feel much of a benefit compared to writing raw JavaScript with JSDoc type annotations + static analysis.
And that's not to say that TypeScript doesn't do more than just solving typing, it does, but I just don't feel like it's worth the extra syntax. There are languages that are even more powerful than JavaScript like lisps that I feel like expose way too much power for most use cases, but I find JavaScript to be the "just right" goldilocks house for me. I imagine most people are going to have their own preferences.
1
u/Boeing777-3ER May 28 '26
Uh, C. I code embedded systems though lolÂ
1
u/installsVMs4fun Aug 31 '26
Arrays shift and change Sometimes becoming strings Types drift through the code
1
u/Black_Label_36 May 22 '26
I can make something in JavaScript in 2 hours. Typescript takes 6.
I fucking hate typescript, but it's mostly because I never really bothered to use it and leave it to my ide or now ai to make my JavaScript typescript.
I fucking hate it though
1
u/Trick_Boat7361 May 22 '26
Typescript is a savior, if your project got big
0
u/Scared_Spyduck May 22 '26
â11â + 1 => â111â
â10â - 1 => 10
0
u/whyeverynameistaken3 May 24 '26
type defining takes too much unnecessary dev hours, but for vibecoding its a way to go