Removing TypeScript - DHH | Prime Reacts

  Рет қаралды 156,002

ThePrimeTime

ThePrimeTime

Күн бұрын

Recorded live on twitch, GET IN
/ theprimeagen
Reviewed Tweet: dh...
Article: world.hey.com/...
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/dee...

Пікірлер: 629
@ericng8807
@ericng8807 Жыл бұрын
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 Жыл бұрын
lsp is very important tool
@WilsonSilva90
@WilsonSilva90 Жыл бұрын
Turbo has a tiny public API. It won't make much difference.
@danvilela
@danvilela Жыл бұрын
Even auto import stops working without it. It’s insanity.
@danielsharp2402
@danielsharp2402 Жыл бұрын
@@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 Жыл бұрын
@@danielsharp2402 which is fine I guess.. But the base code is now still more readable.
@taliad.1020
@taliad.1020 4 ай бұрын
I feel like the fundamental problem with DHH's perspective is he's focused so much on enjoyability when that's not the purpose of TypeScript. The purpose is preventing errors, not "sparking joy" or whatever.
@doresearchstopwhining
@doresearchstopwhining Жыл бұрын
Can we get a primeagen vs DHH cage match? Seems like the only reasonable way to settle this dispute.
@Thect
@Thect Жыл бұрын
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 Жыл бұрын
DHH will be too busy meeting women. He wouldn't expect us to understand.
@piyushgandhi7959
@piyushgandhi7959 Жыл бұрын
DHH will be too busy racing
@piyushgandhi7959
@piyushgandhi7959 Жыл бұрын
Racing to solve those undefined bugs XD
@OzzyTheGiant
@OzzyTheGiant Жыл бұрын
Turbo 8 doomed to fail now. I didn't even know it existed before this discussion.
@HrHaakon
@HrHaakon Жыл бұрын
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 Жыл бұрын
Then you have to define "dynamic typing". Do you mean runtime type inference?
@HrHaakon
@HrHaakon Жыл бұрын
​@@ElPikacupacabra Yes, probably, unless there's some gotcha you want to pull from some obscure 1974 paper or something...
@coolcax99
@coolcax99 Жыл бұрын
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 Жыл бұрын
@@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 Жыл бұрын
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
@fabricio5p
@fabricio5p Жыл бұрын
The whole reasoning is literally: "It's hard, me doesn't like it"
@jackdavenport5011
@jackdavenport5011 11 ай бұрын
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.
@badalsaibo
@badalsaibo Жыл бұрын
Man so it was your comment at the end of the PR. I laughed like hell when I read that. Absolutely hilarious 😂
@EgorDemeshko
@EgorDemeshko 11 ай бұрын
it such a blessing to be able to hear a clever people. a dream just to write some code for some big staff.
@mrnotpewdiepie8957
@mrnotpewdiepie8957 Жыл бұрын
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
@quinndirks5653
@quinndirks5653 10 ай бұрын
The reason people think types are good is because of intellisense. No one has tried to develop proper intellisense for javascript. I believe this so strongly... Currently developing my own editor. You can have dynamic types. The argument is getting confused because of this issue. Think about it.
@obamna36
@obamna36 Жыл бұрын
i mean yeah do what ever you do man im sticking with typescript i dont want to deal with undefined function
@SM-ok3sz
@SM-ok3sz Жыл бұрын
It’s funny seeing him praise jsdoc after watching the comment video.
@alcar32sharif
@alcar32sharif Жыл бұрын
How masochistic do you have to be to enjoy JavaScript? Is there a safe word if it gets too much for you?
@robrick9361
@robrick9361 Жыл бұрын
The safeword is Perl.
@nandoflorestan
@nandoflorestan Жыл бұрын
Javascript is a language that makes kittens cry. The problem is, TypeScript is only a superset of JS. They should just implement F# in browsers, then JS could go the ActionScript way -- that's what would actually save us.
@dabbopabblo
@dabbopabblo Жыл бұрын
JSDoc is such a perfect middle ground for large scale projects. It lets you define a shape for your functions and descriptions to point out edge cases and caveats, or just let the users of your code understand what your headspace was making the function. And it doesn't even affect your development process as the library dev. I just wish I didn't have to constantly fold the comments and yet still have them take up a line of space. When I'm in the flow state and can understand what the functions do via name (something a library user might not, but a library dev would) I'd rather the comment was inline before the function and automatically folded by the editor plus some ghost text following the parameters showing their types, that would be nice. Almost a best of both worlds between typescripts syntax, your editors capabilities and, jsdocs opt-in-ability. Then a type can be added via your editor lifting the typed type to the folded comment and rendering the ghost type over your parameter. Clicking on the ghost type could allow it to be edited, it could even behave like normal text or be a floating input aligned with the parameter.
@radvilardian740
@radvilardian740 Жыл бұрын
old man being called dumb by youngsters, yes that's DHH.
@ahbarahad3203
@ahbarahad3203 Жыл бұрын
Javascript a joy to write? DONT ever let this guy cook again
@amesasw
@amesasw 4 ай бұрын
Still waiting for cyrpto, nfts and web3 to change my life... that being said I think chat gpt 3.5 is already more impactful than all of those things. Seems like we can finally start talking to our computers.
@jppommet
@jppommet Жыл бұрын
8:15 Lol the reaction, that’s a ruby 😅
@bigbear187uk
@bigbear187uk Жыл бұрын
How have I only found your content today 😂
@paulmoore3755
@paulmoore3755 Жыл бұрын
I like Haskell and Clojure one could say I am conflicted.
@kahnfatman
@kahnfatman 11 ай бұрын
Yup -- I am sick and tired of TS. It requires so much typing like Java, allows such much gymnastics to facilitate strong typing -- and yet: DOES NOT provides ANY forms of runtime type checking/enforcement. If explicit type declaration/notation helps documentation, WTF, it's wild and hard to understand than a ReaderT IO monad transformer!
@sheko4515
@sheko4515 Жыл бұрын
The issue that this JavaScript/ Typescript eco system is driving everyone crazy let's be honest it is a failing system from the beginning built on top of a flawed language JavaScript that we are all kept hostage to its abuse just because it is the client side only language cannot wait to live the day when we can write PHP, Ruby C#,Java, etc with web assembly's help on the client side or with whatever technology that will allow us to do that.
@catcatcatcatcatcatcatcatcatca
@catcatcatcatcatcatcatcatcatca Жыл бұрын
This is a major problem only until literally one person makes a downstream fork that in reasonable time adds the type-definitions to new releases. If the types are just for linting and LSP it shouldn’t matter if the code was originally written with or without them. I do think a library with clear documentation of types is better, but the code, being free as in freedom, is provided AS IS. The author still continues development and support, they just dropped a non-critical feature. That seems not at all unreasonable.
@SimonBuchanNz
@SimonBuchanNz Жыл бұрын
Don't need to do that, you just add them to DefinitelyTyped (ie @types)
@Altrue
@Altrue Жыл бұрын
DHH making huge contributions to the dev community by curing everyone's imposter syndrome with a single blog post.
@nen_02
@nen_02 Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
​​@@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 Жыл бұрын
​@@jel1951static types you meab
@NECOdes
@NECOdes Жыл бұрын
@@oscarljimenez5717 no, it's still ugly and never been amongst "good looking" ones
@ameer6168
@ameer6168 Жыл бұрын
​@@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 Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
@@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 Жыл бұрын
@@sk-sm9sh yes, i do.
@ajfalo-fi3721
@ajfalo-fi3721 Жыл бұрын
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 Жыл бұрын
​@@homelessrobotwrong turbo. the topic of the video is hotwired turbo
@nordern1
@nordern1 Жыл бұрын
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.
@FeLiNe418
@FeLiNe418 Жыл бұрын
Even The Primeagen is Prone to mistakes
@siveroo7493
@siveroo7493 Жыл бұрын
The Proneagen
@uqams
@uqams Жыл бұрын
Proneagen Toagen Mistakesagen
@sameed1992
@sameed1992 Жыл бұрын
the name is the prone-agen
@xbmarx
@xbmarx Жыл бұрын
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 Жыл бұрын
super position of the worst
@smallfox8623
@smallfox8623 Жыл бұрын
Typescript is statically typed end of. No quotes needed.
@nordern1
@nordern1 Жыл бұрын
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.
@gJonii
@gJonii Ай бұрын
​@@smallfox8623It's not though? TS has absolute zero guarantees about runtime stuff, you might have put your function to only accept string arguments, but runtime, you might get absolutely whatever there. Typescript seems more like type hint system.
@smallfox8623
@smallfox8623 Ай бұрын
@@gJonii Static typing is only a thing at compile time because that is when the static type analysis is performed. For the best example of this we have C which is undoubtedly statically typed but any type information here is lost in its compiled form. The hint is in the name; the static part means that the type analysis is performed using only the text of the program as input. In contrast a dynamic type system performs its type checking at runtime.
@johnpope1473
@johnpope1473 Жыл бұрын
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.
@biz0r07
@biz0r07 Жыл бұрын
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 Жыл бұрын
based take
@justpatrick_
@justpatrick_ Жыл бұрын
Yeah, besides it's libraries not products
@VuTuanIT
@VuTuanIT Жыл бұрын
Like “I’m doing what I want, fuck all people who relates to my thing” 😂
@stevenhe3462
@stevenhe3462 Жыл бұрын
We knew DHH does not care about backwards-compatibility from the fact that each Rails version breaks the last one.
@lungfish
@lungfish 11 ай бұрын
People get rightly punished for relying too much on bad third party tools
@igorordecha
@igorordecha 3 ай бұрын
​@@lungfishpeople get rightly punished for relying too much on DHH's code
@lungfish
@lungfish 3 ай бұрын
@@igorordecha go back to your python and javascript piles and stay away from rails.
@igorordecha
@igorordecha 3 ай бұрын
@@lungfish lil triggered arent you
@isodoubIet
@isodoubIet 2 ай бұрын
@@lungfish touching rails is often ill-advised yes
@elitnoctua
@elitnoctua Жыл бұрын
Isn’t javascript already strictly typed? Everything can only be one type… an Object.
@ThrowFence
@ThrowFence 2 күн бұрын
No there's also number, string, undefined, boolean and symbol.
@Gornius
@Gornius Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
And this is why every library and every large app written in Python must use mypy.
@sk-sm9sh
@sk-sm9sh Жыл бұрын
@@ruanpingshan also same thing for passed arguments, and then some functions in some conditions would return entirely different structures.
@NihongoWakannai
@NihongoWakannai 8 ай бұрын
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 6 ай бұрын
Because size:number is so much clearer?
@jongeduard
@jongeduard Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
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 4 ай бұрын
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.
@ChiragPatel-y1d
@ChiragPatel-y1d 9 ай бұрын
TS result in bloated code for big projects. Unnecessary complexities and over engineering. May look good in learning tutorials but it is really no fun in real projects. Typescript projects feels like 10 yr old C# projects with lots of unnecessary interfaces and types..
@zactron1997
@zactron1997 Жыл бұрын
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 Жыл бұрын
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.
@PanosPitsi
@PanosPitsi Жыл бұрын
@@homelessrobot "I don't know what the word interface means therefore I don't need it"
@homelessrobot
@homelessrobot Жыл бұрын
@@PanosPitsi 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)
@PanosPitsi
@PanosPitsi Жыл бұрын
@@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 Жыл бұрын
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.
@woolfel
@woolfel Жыл бұрын
there's way too much religion in programming and software development. It's a tool. Learn as many tools and problem solving skills as time allows. shitting on some other person's religion is pointless. having spent over 10 years working in consulting, I have to pick up what ever tool the customer chose. fighting decisions someone else made is a loosing battle and will get you fired.
@thegrumpydeveloper
@thegrumpydeveloper Жыл бұрын
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 Жыл бұрын
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
@martiananomaly
@martiananomaly Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
^^ above comment is exemplar Stockholm syndrome cause by TS.
@UwU-dx5hu
@UwU-dx5hu Жыл бұрын
Agreee typescript is really nice to be honest
@GameFuMaster
@GameFuMaster 9 ай бұрын
@@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 9 ай бұрын
@@GameFuMaster i think the original comment i replied to was deleted. my reply seems to make no sense.
@Sound_.-Safari
@Sound_.-Safari 9 ай бұрын
I don't think it's "user-hostile" given the fact it's an open-source library. Anyone complaining about a free library they use sounds whinny and immature 🤷‍♂
@LoneDWispOfficial
@LoneDWispOfficial Жыл бұрын
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.
@DanteMishima
@DanteMishima Жыл бұрын
Allow people to make the choice. Absolutely agree. But the typescript gang don't do that to they? They want everything with types
@m-ok-6379
@m-ok-6379 Жыл бұрын
TypeScript is garbage and in the near future, we will look back and laugh at how we used TypeScript.
@RustIsWinning
@RustIsWinning Ай бұрын
D e l u s i o n 100
@dantelooper2283
@dantelooper2283 Жыл бұрын
So basically, Dart and Java and Kotlin and ... should be bad and lab lab lab... bunch of React developers probably. Brain cells raising error
@hermestrismegistus9142
@hermestrismegistus9142 Жыл бұрын
DHH saying that Javascript is his second favorite programming language throws up major red flags. This guy is nuts.
@nitsujism
@nitsujism Жыл бұрын
Well, his first is Ruby so there's that (although personally I quite like it).
@modicool
@modicool Жыл бұрын
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 Жыл бұрын
JavaScript and Ruby lovers are not people to be taken seriously - on any subject matter
@masterflitzer
@masterflitzer Жыл бұрын
​@@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 Жыл бұрын
@@masterflitzer I don't use Ruby. I don't like Vanilla JS, I like Typescript.
@JustBCWi
@JustBCWi Жыл бұрын
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.
@lauraprates8764
@lauraprates8764 Жыл бұрын
The surprise isn't the drop on TS, but rather being proud of using JS
@ZephrymWOW
@ZephrymWOW Жыл бұрын
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
@schneefackel7053
@schneefackel7053 Жыл бұрын
Yeah, right, and if you move to JSDoc, you do your type gymnastics in a poorly defined comment format instead. Because JSDoc only *appears* to be a well-defined standard, and is really more accurately defined by how that standard is interpreted by the only implementation that actually matters to anyone, which is the one in TypeScript's transpiler and LSP. Since it's just comments, there's an extremely low barrier to interpreting its standard differently than the TypeScript implementation does (*cough* web-component-analyzer *cough*), or just outright extending it. And suddenly, you're back to running type-related build tooling to turn that alternative JSDoc interpretation into .d.ts files that TypeScript actually understands…
@lobovutare
@lobovutare 2 ай бұрын
I got ridiculously good at typing, which took a long time and a lot of languages, but now I think not typing is much harder, even on small projects. Types guide development for me and force me to think about the structure of data and the logic that produces it. It is integral to the development process for me.
@modicool
@modicool Жыл бұрын
This guy's pretty weak if he thinks developing and working with Typescript types is hard. I've become a master in typing very quickly, and it's not rocket science.
@Bytewalker
@Bytewalker Жыл бұрын
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
@badunius_code
@badunius_code Жыл бұрын
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.
@kabukitheater9046
@kabukitheater9046 Жыл бұрын
i live for javascript drama. fuck, i love our community lol
@OzzyTheGiant
@OzzyTheGiant Жыл бұрын
Ain't nobody got time for that! 😂
@dylanmeeks54
@dylanmeeks54 Жыл бұрын
Balls
@cowabunga2597
@cowabunga2597 Жыл бұрын
Are nice
@jesustyronechrist2330
@jesustyronechrist2330 Жыл бұрын
Shitballs
@airjuri
@airjuri 10 ай бұрын
There are no hard things that become 'any' if you know what you're doing. ;)
@slebetman
@slebetman Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
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
@Heater-v1.0.0
@Heater-v1.0.0 Жыл бұрын
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?
@riteshgsh
@riteshgsh Жыл бұрын
No you are not weird that's me too. I really like the type system of Go and Rust
@perigord6281
@perigord6281 Жыл бұрын
The weirdly high overlap of Haskell and C developers would disagree
@Dan_1348
@Dan_1348 Жыл бұрын
Yes
@OzzyTheGiant
@OzzyTheGiant Жыл бұрын
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 Жыл бұрын
@@Dan_1348 Thanks Dan. Good to see I'm not too normal.
@LongJourneys
@LongJourneys 10 ай бұрын
I dropped TS in favor of JSDoc about a year ago and haven't looked back
@RustIsWinning
@RustIsWinning Ай бұрын
Imagine having to write doc comments 😂😂😂
@alid.andrada2569
@alid.andrada2569 3 күн бұрын
​@RustIsWinning this is where AI tools come in handy if you can actually write readable code that the AI can infer from
@jamesz80
@jamesz80 11 ай бұрын
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.
@MosiurRahman-dl5ts
@MosiurRahman-dl5ts Жыл бұрын
Hey Prime, Bun released 1.0
@ghun131
@ghun131 Жыл бұрын
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
@rideorhitchhike3347
@rideorhitchhike3347 Жыл бұрын
Came for the prone reaction. Prime wasn't lying on the floor. Clickbait.
@ThePrimeTimeagen
@ThePrimeTimeagen Жыл бұрын
OH SHIT
@iuribrindeiro5009
@iuribrindeiro5009 Жыл бұрын
Someone has to present type inference to this kid. Maybe he’ll stop hating on strongly typed languages a bit
@macccu
@macccu 9 ай бұрын
Chad DHH vs virgin youtuber bascially.
@redhawk3385
@redhawk3385 Жыл бұрын
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 Жыл бұрын
Name shame it…also, why are you using it??
@emilemil1
@emilemil1 Жыл бұрын
1. Not providing types for the public api is evil. 2. I want to see how this shakes out after some years and how many bugs have crept up because of no type checking.
@jeezusjr
@jeezusjr Жыл бұрын
Prime on language lovability: Javascript: "*spits*" Ruby: "*dies laughing*"
@nandoflorestan
@nandoflorestan Жыл бұрын
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.
@PanosPitsi
@PanosPitsi Жыл бұрын
@@nandoflorestan "Legibility of python" dude each one of your comments gets worse I swear python devs come out of some cult or something.
@quelchx
@quelchx Жыл бұрын
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 Жыл бұрын
If TypeScript is too hard for somebody, they probably shouldn't be a developer.
@a-yon_n
@a-yon_n Жыл бұрын
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 9 ай бұрын
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.
@adambickford8720
@adambickford8720 Жыл бұрын
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.
@efferington
@efferington Жыл бұрын
Was wondering if you would go with 'The name .. is theTypeagen', but theDHHagen works too :D
@xaviernogueira
@xaviernogueira Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
Exactly what i was just thinking... Js can use something like that
@PanosPitsi
@PanosPitsi Жыл бұрын
@@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 Жыл бұрын
@@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.
@weeb3277
@weeb3277 Жыл бұрын
wasn't this guy against unit testing too?
@nandoflorestan
@nandoflorestan Жыл бұрын
Exactly. DHH likes to write integration tests only. Oh if you and I had a dime for each time he is wrong and proud of it.
@asdqwe4427
@asdqwe4427 Жыл бұрын
I don’t get how js doc would be easier? How does it save you from complex types?
@kevinclark1783
@kevinclark1783 Жыл бұрын
Ya all examples show simple function parameters and not object style that are just as much work
@agungokill
@agungokill Жыл бұрын
my programmer just fucking forgot what inside those variable, and he has to debug it like 1 week. freak. i think typescript handle this better, to document the undocumented.
@theaninova
@theaninova 10 ай бұрын
God I miss the days when we'd name functions avmt(a, b) to make it concise and completely rely on the non-existent documentation on a random website to know what it does. Just so much more comfortable.
@thedrew6905
@thedrew6905 3 ай бұрын
just use typeoff if statement in your js and u fixed most of the problems without the need of ts. We shhould stop making our life as a coder easier and easier instead of learning how to properly code cause then we will end up relying on frameworks to get better and easier and they will do our job instead of us.
@rapzid3536
@rapzid3536 Жыл бұрын
"An LSP" aka TypeScript. If you "drop" TypeScript and use JsDOC with TypeScript types and tsc as your language server have you really dropped TypeScript? Have you really? 99% of the TypeScript haters out there saying Javascript works fine in VSCode I've got some news for you..
@yavvivvay
@yavvivvay 3 күн бұрын
The guy never liked javascript - prototypes are so much better than the "proper classes".
@JustTheBasicsJS
@JustTheBasicsJS 5 ай бұрын
Without typescript, you can get errors when you don’t reference some variable correctly. You mentioned that in your comment on turbo. But with typesscript you still get an error. The errors aren’t even particularly that helpful. I appreciate the humor of your comment on his post. But I feel that It implies a solution to a problem, but it doesn’t solve that problem. If you’re using typescript and you reference something incorrectly, you still get an error. I’m trying to find a reason why typescript is desirable. So far all I can see is that it makes JavaScript easier for Java developers jumping into web development, and it points out issues for newb devs who don’t know their data. For me, it’s a bunch of overhead without any benefit. Give me a reason why I should be excited to use it.
@AndrewTSq
@AndrewTSq Жыл бұрын
I agree, typescript is like painting your Ferrari pink, and put on Volvo stickers. It might be safer, but i prefer the original car more.
@dromedda6810
@dromedda6810 Жыл бұрын
DHH's favorite languages being ruby and javascript should've warned us way earlier about how nuts the guy is ... WE SHOULD'VE KNOWN
@_unknown_guy
@_unknown_guy 8 ай бұрын
@@michaeljb3107 yeah, laugh as much as you want, Rails inspired so many web frameworks and guess who the author is. Rails is opinionated and that is one of the reasons why it works - any developer joining project will be very familiar how things work no matter the size. Type people are ones that go nuts about library they wont even use or by the looks of comments here - does not even know what it does or are looking at the wrong things. The library has just a bunch of public methods, basically works on data attrs. And yet type apologists losing their nuts. Just another day on Internet.
@kevinwood5048
@kevinwood5048 Жыл бұрын
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.
@edwardcullen1739
@edwardcullen1739 Жыл бұрын
Holy crap, loves Ruby and JS??? Ruby is okay, I guess, apart from aiming to be a "cleaned-up Perl", which is a dubious objective at best and JS? JS isn't a programming language.
@cjjb
@cjjb Жыл бұрын
Ruby chads, rise up ✊
@falven
@falven 11 ай бұрын
I thought the Microsoft hate bandwagon was so 2000, don’t think that will help your completely backwards and incorrect decision nowadays
@boldureans
@boldureans Жыл бұрын
TypeKarens fight!
@DigitalNomadOnFIRE
@DigitalNomadOnFIRE Жыл бұрын
You can have too many abstractions
@laughingvampire7555
@laughingvampire7555 Жыл бұрын
some level of typing is as useful as as dreaming about masturbation, this is what enrages me about all you losers who make fun of Haskell, even if you have some understanding of strong typing you don't really get it. Typing is useful only when you take the full set like Haskell, that is why Rust is cool, because it takes the full commitment like Haskell. If you have escape patches then people is going to cheat and it won't work. So in order to enjoy this you have to make types part of your core thinking process, you need to adopt different ways of thinking. What is a single word for way of thinking? oh yeah, PARADIGM.
@ahmedbenissa5982
@ahmedbenissa5982 Жыл бұрын
For me, people who like dynamic typing, are people who may put a pizza in a washing machine and will still expect the clothes to be washed correctly. And the pizza will fail being washed silently.
@mmmhorsesteaks
@mmmhorsesteaks Жыл бұрын
The comparison with pyrhon doesn't quite fly because js is weakly typed whereas python is strongly typed. Dynamic, that's true, but none of that "1" - 1 = 0 nonsense.
@fulltimefrontend
@fulltimefrontend Жыл бұрын
Oh I love hating Typescript (MS in General) . The type defining should have been a part of originally javascript becuase of only that single limitation many devs were forced to use typescript.
@Charles-pm4so
@Charles-pm4so Жыл бұрын
If typing is the only thing one has understood of the benefits of Typescript, I'm tempted to believe one is a noob at TS and perhaps programming in general.
@dabzilla05
@dabzilla05 10 ай бұрын
my problem is not that DHH made this change, but that he did it as a breaking change to downstream dependencies in the process. As i age, I see less and less reason to break perfectly good software, especially something with allot of dependencies like turbo, because it makes a pain for many of the devs who are actually using your software. If you really hate the way that foo is working, make foo2 and point people to that as the new alternative, dont make foo 2.0 and put people in this position of either getting stuck in dependency hell or eating breaking changes during a time when maybe you have other things to do than rework your entire codebase to accomodate a breaking change. I think if DHH would have just made a new turbo, sans type script, people would have their opinions, but they could stick with the original turbo until they get back from their trip to the bermuda triangle.
@Juke172
@Juke172 10 ай бұрын
I don't like typeless programming languages as they are hard to read later on, you have to memorize everything what something does. I know they are fast to write, but maintenance is pain. If you come back to some code you haven't used in a few months you're basically screwd with typeless code and you have to read through everything that the code does, when it could have been typed well and been very simple to understand what it does. Also adding comments to fix this is little bit of an antipattern, when you could use self documenting code instead. not gonna even talk about how much linters and compilation errors actually help in a long run as it should be obvious, but I guess it's not. Using typed code is about keeping the code reliable, accessible and maintainable, not for speed and or thinking everyone can or even know how to use typeless code correctly. TypeScript is a pain in the ass sometimes, but it keeps everything in order.
@codewizard58
@codewizard58 2 ай бұрын
Language Acquisition Syndrome, Gear Acquisition Syndrome for programmers.
@scornwell100
@scornwell100 Жыл бұрын
Typescript is a complete waste of time for frontend. It makes everything harder and just gets in the way when you could just be using prop-types or something that doesn't take 2x the development effort.
@alexandrep4913
@alexandrep4913 Жыл бұрын
Imagine being mad about a free product. "Buh I use it!", okay, did you sign some contract or something that will force the owner of the repo to not make stupid decisions? The entitlement is bewildering to me
We Tried That, Didn't Work | Prime Reacts
13:40
ThePrimeTime
Рет қаралды 92 М.
How To Find Time To Learn After Work | Prime Reacts
13:37
ThePrimeTime
Рет қаралды 473 М.
🍉😋 #shorts
00:24
Денис Кукояка
Рет қаралды 3,5 МЛН
From Small To Giant Pop Corn #katebrush #funny #shorts
00:17
Kate Brush
Рет қаралды 70 МЛН
Microservices are Technical Debt
31:59
NeetCodeIO
Рет қаралды 347 М.
Cool Tools I’ve Been Using Lately
23:11
Theo - t3․gg
Рет қаралды 324 М.
Sony Is F*cked..
15:44
Asmongold TV
Рет қаралды 466 М.
Prime React: The Story of TypeScript
15:02
ThePrimeTime
Рет қаралды 64 М.
'The Cloud Fugitive' | David Heinemeier Hansson | NTK # 001
19:54
DARK MATTER +
Рет қаралды 10 М.
HTMX Sucks
25:16
Theo - t3․gg
Рет қаралды 124 М.
jsdoc and typescript
7:19
ThePrimeagenClips
Рет қаралды 4,6 М.
Stop Creating Microservices | Prime Reacts
33:35
ThePrimeTime
Рет қаралды 240 М.
Git Is Awful | Prime Reacts
23:10
ThePrimeTime
Рет қаралды 204 М.
DHH discusses SQLite (and Stoicism)
54:00
Aaron Francis
Рет қаралды 76 М.
🍉😋 #shorts
00:24
Денис Кукояка
Рет қаралды 3,5 МЛН