Тёмный

Removing TypeScript - DHH | Prime Reacts 

ThePrimeTime
Подписаться 469 тыс.
Просмотров 142 тыс.
50% 1

Recorded live on twitch, GET IN
/ theprimeagen
Reviewed Tweet: dhh/status/169942...
Article: world.hey.com/dhh/turbo-8-is-...
Author: David Heinemeier Hansson (DHH) | / dhh
MY MAIN YT CHANNEL: Has well edited engineering videos
/ theprimeagen
Discord
/ discord
Have something for me to read or react to?: / theprimeagenreact
Hey I am sponsored by Turso, an edge database. I think they are pretty neet. Give them a try for free and if you want you can get a decent amount off (the free tier is the best (better than planetscale or any other))
turso.tech/deeznuts

Наука

Опубликовано:

 

7 сен 2023

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 604   
@ericng8807
@ericng8807 9 месяцев назад
I do respect when people stick to their guns and really evaluate what works for them and their workflow. But man, I'd lose my shit if autocomplete didn't work
@ThePrimeTimeagen
@ThePrimeTimeagen 9 месяцев назад
lsp is very important tool
@WilsonSilva90
@WilsonSilva90 9 месяцев назад
Turbo has a tiny public API. It won't make much difference.
@danvilela
@danvilela 9 месяцев назад
Even auto import stops working without it. It’s insanity.
@danielsharp2402
@danielsharp2402 9 месяцев назад
@@WilsonSilva90 The sad reality is some hardworking soul is going to write the d.ts and add a @types repo instead of just letting it die with this decision.
@MelroyvandenBerg
@MelroyvandenBerg 9 месяцев назад
@@danielsharp2402 which is fine I guess.. But the base code is now still more readable.
@nen_02
@nen_02 9 месяцев назад
When I just started programming, I love programming languages that support dynamic typing. But after coding big projects with them, I started hating them.
@jel1951
@jel1951 9 месяцев назад
Dynamic programming is crap but I've always hated Typescript syntax. The ugly code you have to write just to get fake types!
@oscarljimenez5717
@oscarljimenez5717 9 месяцев назад
​​@@jel1951if you're writing ugly TS in apps, you're usually writing wrong. And yeah, you can write TS wrong, because of his due to its incremental nature.
@cowabunga2597
@cowabunga2597 9 месяцев назад
​@@jel1951static types you meab
@NECOdes
@NECOdes 9 месяцев назад
@@oscarljimenez5717 no, it's still ugly and never been amongst "good looking" ones
@ameer6168
@ameer6168 9 месяцев назад
​@@jel1951i don't care if it's ugly or mot atleast I'm not spending 5-6 hours to debug code for some silly mistakes
@sk-sm9sh
@sk-sm9sh 9 месяцев назад
I love packages like turbo, that when I go to their npm/turbo, they have all the most important sections like "Community", "Who Uses It", "Security", yet it doesn't have a single word to my boring question "What the heck is turbo?" Surely many people use it so I guess I guess I just gonna do "npm install turbo" regardless of what it does - that's just about the way these days people pick tools.
@homelessrobot
@homelessrobot 9 месяцев назад
if you go to the main page of their website, it tells you at the top of the page: > Turbo is an incremental bundler and build system optimized for JavaScript and TypeScript, written in Rust. ... though I had to click around for like 5 minutes to figure this out from the npm page.
@sk-sm9sh
@sk-sm9sh 9 месяцев назад
@@homelessrobot I know. But don't think you think it would be better if it was first chapter in npm package so that I can quickly decide weather or not I am interested and weagher or not spend more time to look for more information on the homepage ?
@homelessrobot
@homelessrobot 9 месяцев назад
@@sk-sm9sh yes, i do.
@ajfalo-fi3721
@ajfalo-fi3721 9 месяцев назад
Hmmm guys, I think you're looking for the wrong turbo. That's vercel's turbo (which is ok I guess). This whole drama is about @hotwired/turbo
@thatssosanya
@thatssosanya 9 месяцев назад
​@@homelessrobotwrong turbo. the topic of the video is hotwired turbo
@Altrue
@Altrue 9 месяцев назад
DHH making huge contributions to the dev community by curing everyone's imposter syndrome with a single blog post.
@nordern1
@nordern1 9 месяцев назад
I've checked the PR, they hardly use generics, much less any complex TS. Replacing TS with JS doc I can understand, but there has been nothing gained with this PR. Personally I'd rather not use APIs that can't even be bothered to declare what values they expect.
@sameed1992
@sameed1992 9 месяцев назад
the name is the prone-agen
@mattmmilli8287
@mattmmilli8287 3 месяца назад
Everyone grows up and realizes TS is more work up front but way less headaches ( for others as well ) in the future. Eventually anyways
@doresearchstopwhining
@doresearchstopwhining 9 месяцев назад
Can we get a primeagen vs DHH cage match? Seems like the only reasonable way to settle this dispute.
@Thect
@Thect 9 месяцев назад
DHH will be too busy solving errors in all of his wonderful, complex, and geniusly well put together apps. If only there's an easier way for him to find all these bugs faster, so we can have a Prime vs DHH fight...
@basione
@basione 9 месяцев назад
DHH will be too busy meeting women. He wouldn't expect us to understand.
@piyushgandhi7959
@piyushgandhi7959 9 месяцев назад
DHH will be too busy racing
@piyushgandhi7959
@piyushgandhi7959 9 месяцев назад
Racing to solve those undefined bugs XD
@OzzyTheGiant
@OzzyTheGiant 9 месяцев назад
Turbo 8 doomed to fail now. I didn't even know it existed before this discussion.
@HrHaakon
@HrHaakon 9 месяцев назад
Strict typing isn't the opposite of dynamic typing. It's strict vs loose, and static vs dynamic. There are dynamically typed languages with strict typing, like Common Lisp. There are statically typed languages with quite loose typing, like C. Then there's loose/dynamic like JS and PHP, and strict static like Ada. What I've come to learn is I'm fine with dynamic typing, I'm fine with static typing, but I really hate loose typing.
@ElPikacupacabra
@ElPikacupacabra 9 месяцев назад
Then you have to define "dynamic typing". Do you mean runtime type inference?
@HrHaakon
@HrHaakon 9 месяцев назад
​@@ElPikacupacabra Yes, probably, unless there's some gotcha you want to pull from some obscure 1974 paper or something...
@coolcax99
@coolcax99 9 месяцев назад
This is the first time I have heard anyone describe C as loose typing. What do you mean? Every variable has to have a type with a fixed size. Are you referring to the C compiler automatically/user manually converting types in expressions?
@HrHaakon
@HrHaakon 9 месяцев назад
@@coolcax99 Every variable is fixed at compile time, so it is static. However, things like type punning means that it's not really enforced. This makes sense for C, of course, but it's an example of something that has a static system that is not particularly strict.
@raenastra
@raenastra 9 месяцев назад
I usually see it written as "strong" vs "weak" rather than "strict" and "loose". Strong, in this case, meaning resistant to coercion. Python is dynamic and strongly typed. Type checking happens at runtime, but you still can't use an int as a string; it'll raise an exception. JS is dynamic and weakly typed. Type checking also happen at runtime, but you can use an object as a string and it'll implicitly coerce the type for you. Not sure how C fits into this model. It's somewhere in the middle - it does implicitly coerce some things for you, but not as much as JS
@stevenhe3462
@stevenhe3462 9 месяцев назад
We knew DHH does not care about backwards-compatibility from the fact that each Rails version breaks the last one.
@lungfish
@lungfish 8 месяцев назад
People get rightly punished for relying too much on bad third party tools
@igorordecha
@igorordecha 4 дня назад
​@@lungfishpeople get rightly punished for relying too much on DHH's code
@lungfish
@lungfish 4 дня назад
@@igorordecha go back to your python and javascript piles and stay away from rails.
@igorordecha
@igorordecha 3 дня назад
@@lungfish lil triggered arent you
@xbmarx
@xbmarx 9 месяцев назад
It's funny to me that simultaneously the worst example of dynamic typing is JS, and the worst example of "static" typing is TS.
@ThePrimeTimeagen
@ThePrimeTimeagen 9 месяцев назад
super position of the worst
@smallfox8623
@smallfox8623 9 месяцев назад
Typescript is statically typed end of. No quotes needed.
@nordern1
@nordern1 9 месяцев назад
JS and TS aren't examples of worst anything. There are bullshit languages being used in the wild by companies that will make you beg for a language with a functioning debugger.
@jongeduard
@jongeduard 9 месяцев назад
ECMAScript itself should have had types to begin with, at least optional. That's still how I think about the whole thing. It should never have been needed to develop a second language. Having it built into a JS runtime not only saves you from the need of a transpiler, but also bennefits performance a LOT. This is the biggest mistake which has been made around it in history. In fact in the past, there have even been dialects of the language around which already supported types and classes far longer than a decade ago, but which have been discontinued. In fact this was one of the intended goals for ECMAScript 4, the version that never happened. And the most ironic thing, which not many people know either, is that it was for a large part due to Microsoft that it never succeded, because they did not want to agree with the idea of JS to evolve into a powerful technology, because they rather wanted to preserve their very crappy Internet Explorer in the horrible way that it was. It was that same Microsoft which later invented TypeScript instead. Is this really a coincidence?
@ra2enjoyer708
@ra2enjoyer708 9 месяцев назад
Yeah people tend to forget that Javascript (especially the browser one) is crappy because it was born out of free-for-all fight between vendors with all dirty tricks in the world possible and has to accommodate all the legacy code written in those times. That's like python 3 having to be fully backwards compatible with python 2 and python 1 (even pre-GPL license) code.
@a-yon_n
@a-yon_n 9 месяцев назад
Regarding some latest changes in the ES, I’d prefer not having types in js, just do ts. No more messing up with ts please.
@Diosdaddy
@Diosdaddy 15 дней назад
I didn’t know that Microsoft was the company that rejected ES4! 😡. ES4 did happen but not in the browser, was used in the glory days of Adobe Flash (when it introduced bitmap manipulations, 3D and video, before html supoorted those things) under the name ActionScript 3 and was great and very sophisticated (even compared to today’s JS). I’m sure that the strict data typing was the thing that allowed it to optimize the instruction to do heavy graphics inside web pages with the hardware we had had in those days.
@Gornius
@Gornius 9 месяцев назад
I'm pretty sure some people forgot how obnoxious was coding, where you had parameters like "size", and then having to look up a documentation (or source code) on what the author means by "size". Self-documenting property of statically typed languages is in my opinion the most important aspect of them.
@ruanpingshan
@ruanpingshan 9 месяцев назад
My first time coming into contact with Python, I had to look up the source code of a function, then the source code of functions that it called, and then the documentation of functions that those functions called, just to find out the return type of the first function. It turned out to be something like list of lists of pairs of strings.
@nandoflorestan
@nandoflorestan 9 месяцев назад
And this is why every library and every large app written in Python must use mypy.
@sk-sm9sh
@sk-sm9sh 9 месяцев назад
@@ruanpingshan also same thing for passed arguments, and then some functions in some conditions would return entirely different structures.
@NihongoWakannai
@NihongoWakannai 5 месяцев назад
Oh god, using godot engine and having to look at documentation every time I want to get collision data because it's returned as a dictionary with string keys instead of a struct.
@Slink3322
@Slink3322 2 месяца назад
Because size:number is so much clearer?
@zactron1997
@zactron1997 9 месяцев назад
Dynamic typing is great when you don't know what you're trying to write. That's not meant to be an insult, it really is when it's most useful. Being able to just write code and vaguely smash it together even when it doesn't fit is great for mucking around. But if you know what you're trying to solve, if you have any kind of path you can follow, then static typing immediately becomes the superior choice. I've played with dynamic languages (Python, JavaScript, etc.), and static ones (kinda TypeScript, C/#/++/Rust, etc.), and the stage of an idea makes a massive difference in what's more useful. That's why I think I enjoyed using Rust so much, since it gave me the niceties of NPM/eslint/etc. in an all-in-one with a very good type system (I know OCaml is meant to be better and I do intend on trying it eventually, but for now Rust is such a good fit for me I don't have a strong force pulling me away). Anyway, it's a dick move to make your library a binary blob and just say "idk, just use it right lol"
@homelessrobot
@homelessrobot 9 месяцев назад
I see things a little different. Well actually, almost 180 degrees opposite of how you have described things. I think dynamically typed languages are more appropriate when the path is well trodden. Specifically, when the largest sub-components of your thing already exist as stable external components, and the work you are doing is gluing things together or probing an interface boundary. So mainly things that don't actually have all that much nuance to their internal structure. If the structure is obvious, the structure is obvious.
@user-fr2fm3ri3w
@user-fr2fm3ri3w 9 месяцев назад
@@homelessrobot "I don't know what the word interface means therefore I don't need it"
@homelessrobot
@homelessrobot 9 месяцев назад
@@user-fr2fm3ri3w whether you need it or not though, its there, and you are going to interact with it unless your programs don't interact with other code or the user interface or the internet or anything. It's the I in API (also i didn't see the quotes, lol)
@user-fr2fm3ri3w
@user-fr2fm3ri3w 9 месяцев назад
@@homelessrobot saying strong types are bad for big projects is like saying being an alcoholic makes you a good dad. At some points you stop saying your subjective opinion and you start sounding silly.
@PatternShift
@PatternShift 9 месяцев назад
In a way, you're both right and both wrong. Dynamic typing is best when (1) you know what you're trying to do, and (2) you don't yet know what you're trying to do. So you know, almost all of the time. Static typing is definitely the best though when you need the code to go really fast and you need strong guarantees about its behavior. So basically, static typing is only good when you're using Rust. Otherwise it sucks. I mean think about it -- when you're using Rust, you get (1) fast code, (2) guarantees about memory safety (3) guarantees you won't fall into weird concurrency traps and (4) strong functional bounds on program behavior like you get from Haskell or OCaml. Every other statically typed language gives you 0-1 of those benefits. You guys realize there was a head-to-head study done recently and they found that javascript projects had a significantly lower defect rate than typescript projects? They were trying to prove the opposite, that it protects you from bugs, and literally got a 0.99 p value on the hypothesis test. That's pretty much the same as finding out you can be 99% confident that using TypeScript instead of JavaScript will produce more defects. 😂 DHH is definitely a silly man-child though, I can't argue with that.
@lazyh0rse
@lazyh0rse 9 месяцев назад
I guess, it's about choose your poison type of thing. For me, typescript solved the headache of having to test everything every time I change some code. Typescript kinda a pain to write, but once written you are almost sure your code is going to work. THAT's the difference.
@mptcz
@mptcz 4 дня назад
.. i use elm, btw
@FeLiNe418
@FeLiNe418 9 месяцев назад
Even The Primeagen is Prone to mistakes
@siveroo7493
@siveroo7493 9 месяцев назад
The Proneagen
@uqams
@uqams 9 месяцев назад
Proneagen Toagen Mistakesagen
@biz0r07
@biz0r07 9 месяцев назад
I'm sorry...I don't care that a couple of projects have stopped using it, I find it WAY TOO VALUABLE to drop TS
@blobglo
@blobglo 9 месяцев назад
based take
@justpatrick_
@justpatrick_ 9 месяцев назад
Yeah, besides it's libraries not products
@VuTuanIT
@VuTuanIT 9 месяцев назад
Like “I’m doing what I want, fuck all people who relates to my thing” 😂
@LoneDWispOfficial
@LoneDWispOfficial 9 месяцев назад
tbh, after months coding with Javascript, I felt more joy to code when I have learned JSDoc, because when you start to earn intellisense, programming quality increases a lot. And months after using JSDoc, I find more joy when start using typescript, because I was stop to getting errors generated by accessing a properties from a undefine data (many times easy to fix, but a often is something that you eyes just don't catch). What I have learn from that is: I don't want to block my code from compiling because of typing, but I really wanted the lint warnings/error highlight to let me spend more time programming an idea, instead debugging. For rules that I don't like in Typescript, I just disable then, so my lint don't force me to make nonsense workarounds. All this is the context of build small apps.
@martiananomaly
@martiananomaly 9 месяцев назад
I was hesitant to try Typescript for a long time. When I actually tried it, I could not go back to a javascript codebase because javascript truly sucks in comparison to typescript. Long live typescript.
@a-yon_n
@a-yon_n 9 месяцев назад
I still write js for some simple scripts, but even that I need to use jsdoc, without type hint and autocompletion, I don't know what I can do.
@loshan1212
@loshan1212 9 месяцев назад
^^ above comment is exemplar Stockholm syndrome cause by TS.
@UwU-dx5hu
@UwU-dx5hu 8 месяцев назад
Agreee typescript is really nice to be honest
@GameFuMaster
@GameFuMaster 5 месяцев назад
@@loshan1212 Typescript feels incomplete at times, and at worst, needs some typing gymnastics. Take for example, if you do Object.keys(obj), it'll just return string[], instead of the array of the keys. There are probably other outliers but these kind of cases makes me think that just using JSDoc to document the major expectations, and then just get used to the codebase, rather than spending half your time trying to type correctly, only to throw them out once specs change
@loshan1212
@loshan1212 5 месяцев назад
@@GameFuMaster i think the original comment i replied to was deleted. my reply seems to make no sense.
@hellelo.5840
@hellelo.5840 9 месяцев назад
The coupling between the type system and the code makes it easy to make root changes after a long time from touching codebase
@Stevie1derson
@Stevie1derson 9 месяцев назад
@7:47 I know this is a vim based ch, and I'm in the boat of learning it the way prime did with an IDE first, BUT, hear me out... So regarding the snippets, most JetBrains IDEs now include Ai Assistant. I've been using the "Write documentation" pre defined prompt (if it's not there you can add it on your own manually) and this essentially asks the AI to read selected code, and write documentation. Based on the code it knows to write JSDoc, GoDoc, C#'s /// (w/e you call this crap) etc. This is big timesaver for me! Worth checking out
@jdiehl2236
@jdiehl2236 9 месяцев назад
"We're getting rid of TypeScript because I'm not having as much fun as I would have without it. All technical reasons aside, I'm the boss and I don't enjoy writing it so byebye!"
@thegrumpydeveloper
@thegrumpydeveloper 9 месяцев назад
Me coding in js after coding in ts feels like running around with scissors on a floor full of nails and then onto a high wire rope without a net. Fun times.
@Manker00
@Manker00 9 месяцев назад
There should probably be a (black) background for the chat as currently neither the article text blow nor the chat above are readable; as such at least the chat is readable
@badalsaibo
@badalsaibo 9 месяцев назад
Man so it was your comment at the end of the PR. I laughed like hell when I read that. Absolutely hilarious 😂
@Supersonicboom7
@Supersonicboom7 9 месяцев назад
I love dynamic typing however the more expetience I have with working with strict tyoes the less I feel that type overhead. Now I've really gotten into meta programming and code generation I feel like strict typing is the way to go. However I wish it was possible to disable types on parts of the code momentarily while prototyping. This can't be done in Kotlin but in a roundabout way can be done in typescript, hence why I am a fan of typescript.
@xaviernogueira
@xaviernogueira 9 месяцев назад
I like how python >3.10 does it. There is a "typing" library that allows you to typehint everything. There are ways to assert type at runtime, however its optional. In most cases one just satisfies a linter. Yes, its not as good as static typing, but I appreciate the opt in nature of it.
@nandoflorestan
@nandoflorestan 9 месяцев назад
It is BETTER than static typing because you can write with static types most of the time and then at 1 or 2 places use dynamic typing for great effect. It's more powerful. But if you actually do that, you are wrong, and an idiot. Don't do that. Anyways, not sure why you and the youtuber have more trust in a compiler than in a type checker. Doesn't make sense to me, maybe I am missing something.
@simplygenius4847
@simplygenius4847 9 месяцев назад
Exactly what i was just thinking... Js can use something like that
@user-fr2fm3ri3w
@user-fr2fm3ri3w 9 месяцев назад
@@nandoflorestan ahh yes lets check types at runtime as if python isn't barely faster than doing the math with pen and paper. What's next make every variable a global?
@PatternShift
@PatternShift 9 месяцев назад
@@nandoflorestan by what measure is it better than static typing? the fact that it's optional? you get none of the actual good things you get from a compiler enforcing types and you dirty up some simple python code with a bunch of verbose type hints, to get little more than spell checking out of a linter. you're better off without the type hints. python never would have blown up in popularity like it did if there were brainless type hints littered out everywhere in its early days like there are now.
@jeezusjr
@jeezusjr 9 месяцев назад
Prime on language lovability: Javascript: "*spits*" Ruby: "*dies laughing*"
@nandoflorestan
@nandoflorestan 9 месяцев назад
I tried to learn Ruby when it was hot. It felt like Perl. Lots and lots of syntax and punctuation. Lots of "end". I was super glad to abandon the idea and go back to the legibility of Python. I'll never understand DHH's love for the Ruby language.
@user-fr2fm3ri3w
@user-fr2fm3ri3w 9 месяцев назад
@@nandoflorestan "Legibility of python" dude each one of your comments gets worse I swear python devs come out of some cult or something.
@tychoides
@tychoides 9 месяцев назад
In my experience static typing shines when you have a big app or library with a clear design and you need to implement the logic carefully. Dynamic typing is great for scripting or data analysis. For the user. Most of the time the variable types are self explanatory in scripts and you don't really need the boilerplate code anyway. I am working in data science and scientific computing, and the true is that the main issue is not type bugs but issues with the data itself. Dynamic typing and interpreted languages with a REPL like loop are great for understanding the data fast. That is the reason I use Python since 2.5. as it is great in that and as glue language for faster code.
@lauraprates8764
@lauraprates8764 9 месяцев назад
The surprise isn't the drop on TS, but rather being proud of using JS
@ZephrymWOW
@ZephrymWOW 9 месяцев назад
He just says he likes developing in it lol, It can be a pretty soothing experience after working on a project that heavily uses OOP / strict typing. Until its not... The paycheck it gives you is pretty soothing too
@Bytewalker
@Bytewalker 9 месяцев назад
the creator of Ruby on Rails doesn't like type safety, color me shocked. The spirit of javascript, just lmao - a shit language created in 7 days so netscape could put Java in the name
@EgorDemeshko
@EgorDemeshko 7 месяцев назад
it such a blessing to be able to hear a clever people. a dream just to write some code for some big staff.
@efferington
@efferington 9 месяцев назад
Was wondering if you would go with 'The name .. is theTypeagen', but theDHHagen works too :D
@rkeenan85
@rkeenan85 9 месяцев назад
That is God-tier trolling on that PR conversation.
@OzzyTheGiant
@OzzyTheGiant 9 месяцев назад
I freaking lost my marbles there 😂. Absolute Grade-A trolling. Imma go upvote that
@PieterWigboldus
@PieterWigboldus 7 месяцев назад
JSDoc is great, you can do the same type checks and typescript with eslint, and you have a better seperation of runtime code and helpful information for development (type hints)
@fabricio5p
@fabricio5p 9 месяцев назад
The whole reasoning is literally: "It's hard, me doesn't like it"
@Iggy_Lakic
@Iggy_Lakic 9 месяцев назад
Your closing PR message Primeagen is legendary, pure magic😀👍👍
@JohnSmall314
@JohnSmall314 7 месяцев назад
Typescript is great if you're paid by the hour working in a big company with massive budgets and not much focus on getting product out. If you're doing a Rails project then you want rapid development, and Typescript is just going to hold you back.A five minute job can easily become 5 hours while you try to figure out what TS is complaining about. It's also a big cause of bike shedding, because it gives people encouragement to obsess over minute differences in coding styles.
@slebetman
@slebetman 9 месяцев назад
For a couple of my new projects I've started using jsdoc and it's actually nice. It's ugly inside the code but it's nice when you're using the code.
@OzzyTheGiant
@OzzyTheGiant 9 месяцев назад
I started doing this when I joined a React project with plain JS. The tech lead can't organize code for squat and it is a pain having to debug all his spaghetti code, so I started implementing types using JSDoc and definition files. Works like a charm!
@peterradziewicz4685
@peterradziewicz4685 9 месяцев назад
Yea unless you and everyone on your team are 200 IQ there's just no reason not to put at least some basic jsdocs with how functions are intended to be used. Just laziness honestly. Vanilla js gets a bad name because people are lazy
@badunius_code
@badunius_code 9 месяцев назад
5:10 all strict type languages works like this. But if you enjoy not knowing what structure is expected as an argument or is returned from a function, who am I to stop you.
@redhawk3385
@redhawk3385 9 месяцев назад
The popular library I'm using has a author like DHH, he's a nightmare to work with, and god forbid you need help.
@kevinclark1783
@kevinclark1783 9 месяцев назад
Name shame it…also, why are you using it??
@_evillevi
@_evillevi 9 месяцев назад
every day I fall even more in love with Rich Harris. damn you, BASED viking god!
@johnpope1473
@johnpope1473 8 месяцев назад
00:04:22 - I agree - but in the last week - I've started just throwing objects at chatgpt - and asking it to define the types. Eh voila`. takes pain away.
@gadgetboyplaysmc
@gadgetboyplaysmc 9 месяцев назад
Lmao that comment before Theo's PR was closed was gold man
@DanteMishima
@DanteMishima 9 месяцев назад
Allow people to make the choice. Absolutely agree. But the typescript gang don't do that to they? They want everything with types
@pharmajoe990
@pharmajoe990 9 месяцев назад
In my experience dynamic languages are fast to build things with, but are awful to maintain at any reasonable scale. Types document code, enable much nicer refactoring and IDE tooling. I’ve used JS, TS, Ruby, Java, Groovy and Scala in big production apps and would always go for types over dynamic. But, whatever works, if it’s your project. Type compilation just saves so many bugs from making it into production code.
@jackdavenport5011
@jackdavenport5011 8 месяцев назад
Personally I've tried JSDoc and it is no replacement for Typescript. I was using it because I was making a template for a coding workshop that I was sending out to kids and I didn't want them to have to install Node and a bunch of stuff to get Typescript working, so I switched back to vanilla JS and just used JSDoc for typing. I instantly started making clumsy mistakes again because JSDoc doesn't highlight errors when the types don't match anymore. And also when I closed the project and came back to it in my IDE, it didn't load up all of the types for files I hadn't opened and I had to open each individual file for Vscode to index the types, so doing that on a huge project with hundreds of files would be a bigger pain in the *** than just using Typescript in the first place. I respect some people not wanting to use it, but I think the tradeoffs of not using Typescript aren't worth it.
@elitnoctua
@elitnoctua 9 месяцев назад
Isn’t javascript already strictly typed? Everything can only be one type… an Object.
@BudgieMind
@BudgieMind 9 месяцев назад
I subscribed but missing al the streams, when the streams are on air?
@renegadeace1735
@renegadeace1735 8 месяцев назад
Hmm, yes there is the occasional typing gymnastics, but one of the things I like about TypeScript is when trying to using a library I know what props are the the thing is that I'm importing.
@YoungGrizzly
@YoungGrizzly 7 месяцев назад
“hard things become ‘any’” bro that is so dam true!
@kabukitheater9046
@kabukitheater9046 9 месяцев назад
i live for javascript drama. fuck, i love our community lol
@OzzyTheGiant
@OzzyTheGiant 9 месяцев назад
Ain't nobody got time for that! 😂
@Heater-v1.0.0
@Heater-v1.0.0 9 месяцев назад
I love Rust for its full anal fussing over types, mutable references, lifetimes, etc. Keeps me on the straight and narrow. I love Javascript for it full on "I don't care about anything" approach. Lets me type and go. Works in the browser with no compilation, no builds system nonsense. All the other languages I know fall "on the spectrum" between the two extremes and have nothing much different to offer. In short I love Rust and JS because they are polar opposites. Am I weird?
@__ritesh
@__ritesh 9 месяцев назад
No you are not weird that's me too. I really like the type system of Go and Rust
@perigord6281
@perigord6281 9 месяцев назад
The weirdly high overlap of Haskell and C developers would disagree
@Dan_1348
@Dan_1348 9 месяцев назад
Yes
@OzzyTheGiant
@OzzyTheGiant 9 месяцев назад
No, I'm on a similar boat. I love Angular because it enforces a rigid but clean app architecture on you using proper OOP patterns. Meanwhile I love Svelte because it's extremely flexible by allowing you to write JS in its simplest form, which is easy to read and understand. React in the middle is just a mess.
@Heater-v1.0.0
@Heater-v1.0.0 9 месяцев назад
@@Dan_1348 Thanks Dan. Good to see I'm not too normal.
@hermestrismegistus9142
@hermestrismegistus9142 9 месяцев назад
DHH saying that Javascript is his second favorite programming language throws up major red flags. This guy is nuts.
@nitsujism
@nitsujism 9 месяцев назад
Well, his first is Ruby so there's that (although personally I quite like it).
@modicool
@modicool 9 месяцев назад
How's that? Do you mean instead of Typescript? If you're only dealing with web stack, it's useful to keep certain things the same (like, say, using the same typedefs files referenced in both the server and client rather than duplicate them). Besides C# and PHP I have not really worked with any other languages for server-side. Open to suggestions.
@TheSulross
@TheSulross 9 месяцев назад
JavaScript and Ruby lovers are not people to be taken seriously - on any subject matter
@masterflitzer
@masterflitzer 9 месяцев назад
​@@modicooldude if ruby and js are your fav langs you are insane, they're both just spaghetti langs not suitable for serious stuff, obviously you can code serious stuff in it but it's not suitable (there's a big difference)
@modicool
@modicool 9 месяцев назад
@@masterflitzer I don't use Ruby. I don't like Vanilla JS, I like Typescript.
@Its_Koala
@Its_Koala 9 месяцев назад
Holy shit that PR comment might be the funniest thing Prime has ever done.
@peq42_
@peq42_ 9 месяцев назад
whats your view on javascript getting optional types, I believe?
@snk-js
@snk-js 9 месяцев назад
these days I was trying to solve an algorithm problem with javascript in codewars and the problem was difficult so I pulled vscode code in it instead. Came out that I needed to switch to TS and after finishing converting again to js before submiting my code.
@ghun131
@ghun131 9 месяцев назад
I dont like reading TS type but jsdoc is even harder for my eyes 😢. I wish JS optional static type proposal would come out soon
@bigbear187uk
@bigbear187uk 9 месяцев назад
How have I only found your content today 😂
@kevinwood5048
@kevinwood5048 9 месяцев назад
I can empathize with their decision from the viewpoint that Typescript adds overhead and complexity to your dev/build setup can add real maintenance cost. But as a consumable library, I hope they are not shooting themselves in the foot. At least use jsdoc where it counts.
@br3nto
@br3nto 9 месяцев назад
2:20 Ruby is actually a very Awesome language. Makes you feel like God.
@Gorops
@Gorops 9 месяцев назад
We proly gona get types in vanilla JS sooner now.
@archmad
@archmad 9 месяцев назад
i love generics, but when im not doing it, only when im using it
@AllanSavolainen
@AllanSavolainen 2 месяца назад
I think I finally understood the problem, library people seem to be using types incorrectly. You shouldn't have any complex types, just the basic ones like string, int, float, array. You don't need more as you, as a library, should in any case do some checking on any passed value, with types you just know that the input given is a string, now just go ahead and verify that it is a valid URL.
@quelchx
@quelchx 9 месяцев назад
Sometimes I think the main argument I hear about typescript is basically it's too hard to define everything and people don't want to assign the ugly any type... so they go use JS where everything is basically any no matter what layer you add to 'define' things. To me it's any -- regardless of what comment is above it + you have to write a lot of damn comments. Makes sense I guess.
@squeezy9011
@squeezy9011 9 месяцев назад
If TypeScript is too hard for somebody, they probably shouldn't be a developer.
@a-yon_n
@a-yon_n 9 месяцев назад
There are good developers and bad developers, some people just don’t care about code qualities, just keep away from them, and use generics.
@user-hu1jr6fb9k
@user-hu1jr6fb9k 6 месяцев назад
It is only hard to define everything, if you are working with very crap 3rd party code / libs or if you simply don't know what you're doing.
@gadgetboyplaysmc
@gadgetboyplaysmc 9 месяцев назад
The video awaited since this was tweeted
@Dave01Rhodes
@Dave01Rhodes 8 месяцев назад
It’s weird to me that ECMA haven’t put typescript-style hints into JS syntax. They could still be completely ignored at runtime, but your editor or source control integration step could validate types for you. And heck, JS already has “strict” mode. JS engines could add “strict type” mode where it does runtime type checking and throws type error exceptions. That and it would be funny to see a Microsoft product get embraced, turned into an extension to JS, and then extinguished.
@kon.simeonov
@kon.simeonov 5 месяцев назад
I'm doubtful this will ever happen, because type annotations will further bloat the bundle sizes and site load times.
@Dave01Rhodes
@Dave01Rhodes 5 месяцев назад
@@kon.simeonov true, but if you’re concerned about file size you’ll pass your production JS through a minifier and that can strip off type annotations.
@kon.simeonov
@kon.simeonov 5 месяцев назад
@@Dave01Rhodes What you're describing is the way the typescript toolchain works rn.
@Dave01Rhodes
@Dave01Rhodes 5 месяцев назад
@@kon.simeonov the point is that it wouldn’t have to work that way.
@LiquidToast12
@LiquidToast12 8 месяцев назад
Typescript is great for people who aren't smart enough to know how to work with dynamically typed languages.
@LongJourneys
@LongJourneys 6 месяцев назад
I dropped TS in favor of JSDoc about a year ago and haven't looked back
@mrnotpewdiepie8957
@mrnotpewdiepie8957 9 месяцев назад
I feel like it's inverse of the size of a project. Small project = nice to don't have to specify every type. Big project = understanding, refactoring and modifying code is so much better with strict types
@cyberneticbutterfly8506
@cyberneticbutterfly8506 7 месяцев назад
Whether I like Typescript or not is dependent on what the realities of my project at hand are. Size of project, library or application, timeframe and urgency, responsibilities I personally have on the project at hand, and so on.
@jamesz80
@jamesz80 8 месяцев назад
I love JavaScript but for a completely different reason to DHH, I.e without the classes, just keep it all functional. Functional code scales to infinite complexity, but you do need to know what you are doing. A couple of seniors to steer things in the right direction.
@JustBCWi
@JustBCWi 9 месяцев назад
I thought DHH has not released this to prod yet. If the issue is typing, then perhaps he (or someone else) should consider adding JSDOCS and let's move on.
@asdqwe4427
@asdqwe4427 9 месяцев назад
I don’t get how js doc would be easier? How does it save you from complex types?
@kevinclark1783
@kevinclark1783 9 месяцев назад
Ya all examples show simple function parameters and not object style that are just as much work
@JosephMcMurray1984
@JosephMcMurray1984 9 месяцев назад
Typescript > JSDoc. I just don't see the benefits of using JSDoc over Typescript. Am I missing something?
@kevinclark1783
@kevinclark1783 9 месяцев назад
You are not.
@MosiurRahman-dl5ts
@MosiurRahman-dl5ts 9 месяцев назад
Hey Prime, Bun released 1.0
@danteDeveloper
@danteDeveloper 9 месяцев назад
Is dieting on frontend tools are new trends in 2023 ?
@DavideFicano
@DavideFicano 9 месяцев назад
In my team there are smart and (I'm thinking to a non offensive term...) "less smart" developers, since we use TS (and eslint) we noticed a decrease of bugs, and more important less regressions, libraries like Svelte and Turbo are written by the best programmers of the world but real applications are written by junior developers, demotivated people and only few smart guys like me (ahah I'm the best of the worst) so a strong type language is vital, putting types on JSDoc is possible on libraries but it's hard to be sure my team mates do this
@merryn9000
@merryn9000 9 месяцев назад
Honestly sounds like you either need to learn to respect your team or hire some new people. You really don't need to be all that smart to be good at most programming jobs
@merryn9000
@merryn9000 9 месяцев назад
*just not dumb
@sp3cterproductions
@sp3cterproductions 9 месяцев назад
This is what happens when the cocky fresh out of college junior never grows out of their self righteous phase.
@wiztek1197
@wiztek1197 9 месяцев назад
The really funny thing for me is before this tweet is i never knew what turbo 8 is And days later i still don't know what it is
@kirglow4639
@kirglow4639 9 месяцев назад
"Emotion-driven development"
@ismail-talb
@ismail-talb 9 месяцев назад
I just have a question : won't AI be able to type any js code in the coming few months?!
@guai9632
@guai9632 9 месяцев назад
that's how humanity will end
@GeneraluStelaru
@GeneraluStelaru 9 месяцев назад
Baby JS goes nappy-free! It can now pee type errors everywhere.
@krtirtho
@krtirtho 9 месяцев назад
Everything is the result of Typescript type loops/iterators, conditional types & template string type literals
@humansaremortal3803
@humansaremortal3803 9 месяцев назад
Turbo is a thing under the hood, next to your engine.
@ehibble
@ehibble 6 месяцев назад
Idk why but I've never looked at your sub count until now and was blown away that it was less than a 1M. Your content is amazing, there is no developer that's more entertaining. You're the best man
@13zebras
@13zebras 9 месяцев назад
DHH and "dickwaddery" will forever be linked in my mind. Thanks, Rich and Prime. :D
@Casilios
@Casilios 9 месяцев назад
i can only dream about writing an app one day...
@DigitalNomadOnFIRE
@DigitalNomadOnFIRE 9 месяцев назад
Implicit typing (eg in (C#) is the sweet spot IMHO.
@robertsakurai
@robertsakurai 9 месяцев назад
well... 1 step forward, NaN steps back
@djupstaten2328
@djupstaten2328 9 месяцев назад
Just have interfaces and I'm happy. Apply them directly to objects or make classes, I don't care. Something needs to pop up when I type the "."
@wolfeygamedev1688
@wolfeygamedev1688 9 месяцев назад
Imo, dynamic typing for frontend, run any non UI logic on the server using a static typesystem.
@digitalspecter
@digitalspecter 9 месяцев назад
"Let me use this crappy type system to reinforce my rationalization why I like dynamic typing."
@staticvars
@staticvars 9 месяцев назад
Let us live in peace in Ruby land without our types.
@protocj3735
@protocj3735 9 месяцев назад
New idea - lets go back to the roots and prefix the type the variable: var str_name = 'Primegean'
@bnchi
@bnchi 9 месяцев назад
it's all about the apps baby
@terrencemoore8739
@terrencemoore8739 9 месяцев назад
I wonder how prime would feel about Python's Typing library. I feel it's harder to trick the types in Python than in JavaScript so maybe it'd be a bit safer. Python also has slots for their classes so you can specify types prior for the fields of classes making them lighter weight than your average class (unless it's all just python magic😂)
@RealRatchet
@RealRatchet 9 месяцев назад
Supposedly py3.12 will use annotations for jitting, which should speed up a lot of things if you're anal about putting in annotations in your code so that autocomplete doesn't shit itself. But I find it sometimes pylance still shits itself even if you explicitly define the type annotations.
@FlanPoirot
@FlanPoirot 9 месяцев назад
python's type system is actually flawed and type checkers fail to properly know what type something has even when you annotate it urself. the official type checker (mypy) is actually worse than pyright (and even pyright being better is still not perfect or near it) but the good thing python has type wise is that it's strongly typed, it won't let u mix and match types and play a guessing game with u, it just throws an error and makes u explicitly do the type conversions (this is one of the biggest reasons for why javascript is a mess, implicit type conversions in it are hell)
@ruanpingshan
@ruanpingshan 9 месяцев назад
I have to read a lot of third-party Python code in my job. Usually my go-to approach to understanding a code repo is to add type hints to my local copy as I read through it. But it's really frustrating, so many people use functions with different return types depending on the argument values. And some libraries released by big companies even have inaccurate type hints that result in pyright mistakenly flagging correct code.
@FlanPoirot
@FlanPoirot 9 месяцев назад
@@ruanpingshan I've given up on understanding python just by reading it. to me python is hard to read once the logic becomes complex using a debugger or printing as u go seems to be the best u can do I also type stuff when it makes sense, but yeah... python type hints aren't reliable and I personally would avoid python on anything reasonably big but there's people that like that workflow of debugging ur way thru the code and guessing types, to each their own ig
@paulie-g
@paulie-g 9 месяцев назад
@@FlanPoirot There are two options here. Either your brain is broken or you're reading sh-t codebases. When I learned Python, I did it by reading Twisted, which was one of the largest and most complex Python codebases at the time (and used zope-like interfaces on top of that). I literally went from knowing 0 Python to understanding Twisted and having a first draft of an async i/o distributed monitoring system built on top of it in less than 2 days. The readability and maintainability of Python are pretty much its standout feature (everything else is meh).
@adambickford8720
@adambickford8720 9 месяцев назад
Once you get used to having type information you understand the 'gains' of loose typing are a false economy. You almost always sacrifice tooling and, most likely, correctness. Its exceedingly rare that being loosely typed is a good thing ime. Sure, maybe if i'm doing something a bit more reflection based or dealing with a truly dynamic payload and maps are too janky w/o providing real safety.
@Noble_Savage
@Noble_Savage 9 месяцев назад
Wait a minute, people still program in Ruby?
@nightshade427
@nightshade427 9 месяцев назад
There are plenty of js libraries that don't have type definitions. Is this that the types were taken away that is issue? Should he have just never even tried to including ts then change mind? Would have been better off never including them to begin with?
Далее
Prime React: The Story of TypeScript
15:02
Просмотров 60 тыс.
Dear ThePrimeagen, You Are Wrong | Prime Reacts
22:14
СКОЛЬКО МОИХ ТРЕКОВ ТЫ ЗНАЕШЬ?
00:41
Is clean code a LIE? Primeagen x Casey Muratori say so
14:15
HTMX Sucks
25:16
Просмотров 91 тыс.
Why I Quit Netflix
7:11
Просмотров 483 тыс.
Cloudflare: Pay Me 120k Or We Shut You Down
30:00
Просмотров 381 тыс.
We Tried That, Didn't Work | Prime Reacts
13:40
Просмотров 86 тыс.
What GenZs Think Of Software Engineering
2:05:46
Просмотров 31 тыс.
Holographic transparent flexible LED panel.
0:20
Просмотров 3,4 млн
AI от Apple - ОБЪЯСНЯЕМ
24:19
Просмотров 116 тыс.
Face ID iPhone 14 Pro
0:59
Просмотров 12 тыс.
ТОП-5 культовых телефонов‼️
1:00