I think people should watch a few other videos from this person. His channel is satire.
Big projects are ditching TypeScript… wtf? - The Code Report
Submitted 1 year ago by ruffsl@programming.dev to programming@programming.dev
https://youtube.com/watch?v=5ChkQKUzDCs
Comments
TheLurker@lemmy.world 1 year ago
newIdentity@sh.itjust.works 1 year ago
Not really. It’s pretty clear when he’s serious and when he isn’t.
TheLurker@lemmy.world 1 year ago
Just because something is satire doesn’t mean it is untrue.
Okay, some of his content could be considered more serious. But the overall aesthetic of the channel is clearly satirical in form.
DoucheBagMcSwag@lemmy.dbzer0.com 1 year ago
How about zero.
Clickbait is an act that should be responded to with non responsiveness
TheLurker@lemmy.world 1 year ago
Fine don’t, but it is not clickbait. It is satire.
Potatos_are_not_friends@lemmy.world 1 year ago
And once again, clickbait YouTuber spreading bullshit appears
ck_@discuss.tchncs.de 1 year ago
Clickbait - The silent killer
Soon on Netflix (probably)
elbarto777@lemmy.world 1 year ago
Tl;dw: it’s too much “type-gymnastics” when developing a library.
mo_ztt@lemmy.world 1 year ago
I clicked, sorta interested in the topic because as it happens I just abandoned Typescript in favor of learning Go for a little nascent project I’m working on. (We do these things not because they are easy, but because they eventually will be good which Typescript+Node apparently never will for my particular project.) Then I saw it was Fireship and clicked back away.
Now it sounds like you’re saying that what they’re claiming is the issue is the one good thing that happened with Javascript in the last however-many years. Yes, it’s a little tedious to have to straighten out all your types. You know what’s more tedious than that? Having to straighten out all your types, but not getting any feedback about it at compile time and having to figure it out based on mysterious failures, or if you’re lucky explicit exceptions, at runtime.
Having worked for a while in Javascript, and now for a pretty short time in Typescript, I cannot imagine trying to make a decent-complexity project in pure Javascript. That I believe is why they tend to not really be all that object-oriented and pass strings around for lots of things and be sorta flaky.
atheken@programming.dev 1 year ago
Yeah, dropping typescript and then codifying type information in jsdoc is comical.
The only thing I would say about your experience is that “dropping TS for go” os a little bit misleading, and it doesn’t really sound like it bears on the general debate of “TS vs. JS” - go and other static languages generally fit a different niche in my opinion, and can be a better option for certain kinds of systems.
If you’re building anything of even moderate complexity, or with more than one person, you really need the types and modularity that TS provides.
I guess it’s also worth noting that JS has actually been influenced/adopted some key features from TS over the years, so it’s possible to do a few things with it to make stuff that’s a bit more maintainable.
huntrss@feddit.de 1 year ago
Too be frank, it is pretty short but your summary is on-point. I would only add, that Svelte also dropped it due to the additional compile step.
However TS can still be used in most of the frameworks including Svelte.
alokir@lemmy.world 1 year ago
I wonder how Svelte’s code is built to make this tradeoff worth it. I’ve been using TS for a long time and in every project the compilation part was the shortest task in the whole build process, especially when you compare it with bundling or running unit tests.
PipedLinkBot@feddit.rocks [bot] 1 year ago
Here is an alternative Piped link(s): piped.video/watch?v=5ChkQKUzDCs
Piped is a privacy-respecting open-source alternative frontend to YouTube.
I’m open-source, check me out at GitHub.
ChaoticNeutralCzech@feddit.de 1 year ago
Opinion from me, a JS beginner: Vanilla is good enough now. If your IDE lets you type common structures like
document.getElementById(“”)
with shortcuts, I find no need to use a framework. Also, vanilla works better in offline projects.Nerd02@lemmy.basedcount.com 1 year ago
How is that related to TS? Aside from the fact that your comment might have just started a civil war (no, vanilla JS is not “good enough”, they created libraries for a reason) this isn’t about using libraries / frameworks. It’s about needing some system to handle type systems to avoid falling in the bottomless pit of:
Uncaught TypeError: Cannot read property of undefined
ChaoticNeutralCzech@feddit.de 1 year ago
I literally don’t know what TypeScript is, lol. I thought it was some enterprise language that compiles to JavaScript for people who cannot handle
document.getElementById(“”)
but will happily assiggn a type to literally everything, just to have the compiler create really weird undecipherable minified JS…
atheken@programming.dev 1 year ago
This is an professional experience thing.
Types support “programming at scale” - scale in the sense of larger code based or multiple people contributing.
If you’re hacking away at a script for a web page, then yeah, have at it.
If you’re supporting more than a few hundreds lines of code or working on a team, you need types to codify and communicate information that can be verified with a compiler.
Whenever you see a larger codebase that is not strongly (or statically) typed, you generally will see unit tests that are verifying the types/structure of outputs.
TehPers@beehaw.org 1 year ago
As someone who has written some Python at work, whenever I need to work on some code without type hints, I spend way too much time trying to figure out what all the parameter types should be for functions. I can’t be the only one doing this though, I’ve seen functions that assume their inputs are strings receiving
pathlib.Path
on some uncommon branch that sure enough errors on some obscure user inputs.I’ve been pushing mypy hard though. It’s not perfect, but it works well enough that it’s still worth using over not using. The biggest pushback has actually been from the amount of time we’d have to spend fixing type-related bugs instead of developing new features.
pjhenry1216@kbin.social 1 year ago
The summary uses the term "vanilla JS" in a weird way. It's just to further denote it's not TypeScript because TypeScript is a language that essentially extends JavaScript. It's not a framework. This is about language choice of TS vs JS inside large complex libraries only.
Libraries tend to have a need for generic typing due to the nature of being code used by other code. So you get a lot of syntax craziness involving Type parameters.
You can still use the libraries mentioned in a TS project. They're just not written in TS. TS and JS can be in the same project. Moreover, it even states this isn't about developers using TS in non-library projects.
dbilitated@aussie.zone 1 year ago
it’s fine to learn with. preferable even. I lead a team of devs writing/maintaining four related front-end applications and at a point you really need a better language.
Potatos_are_not_friends@lemmy.world 1 year ago
Nah. Waste of time imo
scorpionix@feddit.de 1 year ago
I haven’t dealt with a larger JS/Node Project in a while, but I like this approach to using TS features in JS.
cactusupyourbutt@lemmy.world 1 year ago
so he does all of this because he dislikes transpiling because supposedly it makes debugging etc harder? does he know about sourcemaps?
he also says he doesnt like type information in his code, so he adda them as comments. the type information is still there, how is this an improvement?
scorpionix@feddit.de 1 year ago
The issue with transpiling is that the code that’s running in production is not necessarily the one that’s been tested. A source map doesn’t fix that.
iFarmGolems@lemmy.world 1 year ago
I do this daily and believe me when I say that I’d trade my kidney for the ability to use TS natively. This looks good on paper but jsdoc notation has lots of flaws and you literally can’t do some things with it. Also, it doesn’t check if the function actually does the thing you described so it needs manual review every time it’s changed.
plistig@feddit.de 1 year ago
That approach was mentioned in the video.
Templa@beehaw.org 1 year ago
I never met someone that actually used Typescript in a professional setting saying they dislike it. It makes your life easier and you can still have parts of your project using regular JS.
ComeSweetDeath@programming.dev 1 year ago
good. typescript has always caused us more headache than it worth in all my projects. I bill my clients extra for it if they make me work on it.
alokir@lemmy.world 1 year ago
The title makes it seem like it’s a wide spread thing in the industry but according to the video it’s 3 frameworks.
Yeah, it’s additional work but I’ve found that really convoluted or complex type definitions usually mean you should consider refactoring. Of course this is a bit different when it comes to developing frameworks where you might want to support a bunch of different use cases.
Maybe I’m biased because I’ve been using TS ever since it first came out.
jeremyparker@programming.dev 1 year ago
And Rich Harris (Svelte) said, it’s an issue for people in his position, aka, people making tools for developers - he fully expects and respects that the end users (developers using those tools) don’t really experience the downsides.
That said, I feel like we’re seeing a lot of versions of complaints about how big the stacks are getting, how big the foundation is that we “need” just to get started. That desire for minimalism is core to the developer mentality imo, it makes us good at our jobs. I think we’re going to see more paring down and culling in the coming months/years.