Removing TypeScript - DHH | Prime Reacts

Removing TypeScript - DHH | Prime Reacts

ThePrimeTime

11 месяцев назад

148,616 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Private Lister
Private Lister - 20.10.2023 16:39

in terms of types, you can be 1 of two people, who uses it or does not... if you DO NOT use types, then make sure you have TDD. However, if you use types, TS is THE-BEST-OPTION! The train of thought suggesting "TS forces you to code types and then the actual code" is not unique to TS, in fact take any strongly typed programming language, you still need to change types for the purpose of type manipulation.. Where TS shines is, it lets you be more specific and expressive in terms of types. Now, tell me TS is inefficient compared to RUST and Go, A.B.S.O.L.U.T.E.L.Y true! However, I find it shocking to find someone like @ThePrimeTime who likes vim because it lets you code at the speed of thought (in my opinion because it lets you express exactly what you want) but hates TS because it lets you express exactly what you want as a type? Think about it, you could make it as generic as any strongly typed language or make it specific so that your imports accurately translate what to expect.
You say you are fine with JSDoc but that is in a way a type def as well, what is the purpose of a type? 1. To describe what is stored, 2. Guide consumers, TS types are just more specific than JSDoc 🤷‍♂

Ответить
YouJean
YouJean - 18.10.2023 23:08

It is true that maintaining a library or framework that heavily relies on TypeScript typings can sometimes introduce additional complexity and challenges. TypeScript's strong typing system can indeed lead to a more involved and sometimes confusing process when it comes to maintaining and updating typings. There are a few reasons why maintaining typings can become complex:

1. Versioning and Compatibility: Type definitions may need to be updated and tested with each new release or version of the library or framework. Ensuring compatibility and consistent typings across different versions can be challenging, especially as the library evolves and introduces breaking changes.

2. Community Contributions: Open-source libraries often rely on community contributions for maintaining and updating their typings. It can be difficult to manage and merge community PRs related to typings, especially if they introduce conflicting changes or do not align with the project's goals and conventions.

3. Different Use-Cases: Libraries and frameworks may be used in various scenarios and configurations, which can lead to complex typing requirements. Supporting different module systems, bundlers, and runtime environments adds an extra layer of complexity to the typing maintenance process.

That being said, TypeScript still has significant benefits, especially for large-scale projects and teams. It provides static type checking, improved developer tooling, and better documentation for codebases. TypeScript can help catch errors during development, improve code quality, enhance code navigation, autocompletion, and refactoring capabilities. The decision to drop or limit TypeScript usage in a library or framework depends on various factors, including the nature of the project, the size of the codebase, the development team's familiarity with TypeScript, and the overall goals and requirements of the project. It's essential to weigh the trade-offs carefully and consider the benefits and drawbacks in the context of your specific use-case.

Ответить
James Z
James Z - 18.10.2023 17:05

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.

Ответить
Adnan Pirota
Adnan Pirota - 13.10.2023 14:50

Who is this shithead that dares to talk about DHH?

Ответить
Jack Davenport
Jack Davenport - 12.10.2023 12:26

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.

Ответить
Joseph Muller
Joseph Muller - 12.10.2023 00:53

Hey @ThePrimeTime, did you find that the girl was not your... TYPE? 😜

Ответить
falven
falven - 07.10.2023 23:38

I thought the Microsoft hate bandwagon was so 2000, don’t think that will help your completely backwards and incorrect decision nowadays

Ответить
lungfish
lungfish - 06.10.2023 20:13

Turbo is awesome. It's what you should be using instead of HTMX.

Ответить
obamna
obamna - 06.10.2023 04:16

i mean yeah do what ever you do man im sticking with typescript i dont want to deal with undefined function

Ответить
justin smith
justin smith - 05.10.2023 19:25

Just stay away from Web Development if you want to maintain your sanity as a developer

Ответить
Tom Hockett
Tom Hockett - 03.10.2023 05:35

wow man, Prime really hates ruby. Every time he mentioned it there was a cut and edit lmao

Ответить
Tostibrand
Tostibrand - 30.09.2023 22:42

what about scala 3?

Ответить
Code Weekly
Code Weekly - 29.09.2023 17:13

Great things are are hard to attain, JS-TS

Ответить
Dave Rhodes
Dave Rhodes - 29.09.2023 10:32

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.

Ответить
UwU
UwU - 29.09.2023 03:23

This stuff is insane

Ответить
Iuri Brindeiro
Iuri Brindeiro - 28.09.2023 16:37

Someone has to present type inference to this kid. Maybe he’ll stop hating on strongly typed languages a bit

Ответить
Ripul Kumar
Ripul Kumar - 28.09.2023 13:30

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.

Ответить
Liquid Toast
Liquid Toast - 27.09.2023 15:04

Typescript is great for people who aren't smart enough to know how to work with dynamically typed languages.

Ответить
Ahmed BenIssa
Ahmed BenIssa - 26.09.2023 03:24

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.

Ответить
Thomas Conroy
Thomas Conroy - 24.09.2023 20:12

This is my channel; "m"; [Grey Background]. It was stolen by Tom Conroy. HELP.

Ответить
Renegade Ace
Renegade Ace - 23.09.2023 01:56

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.

Ответить
MusicMan
MusicMan - 22.09.2023 23:12

Typescript was created for mediocre developers who are unable to write proper JS code. There is no way on Earth someone can like Typescript's horrendous syntax.

Ответить
Design Density
Design Density - 22.09.2023 20:16

Love your videos 😍
Question:
Have you blocked @t3dotgg from the comments section? 🤣

Ответить
Bojan Matic
Bojan Matic - 22.09.2023 10:42

DHH apparently doesn't know that strong typing and static typing are not the same thing, it always irks me when people misuse those terms like they're interchangeable.

Ответить
Olle Bröms
Olle Bröms - 22.09.2023 08:31

This is way it’s better to only use JavaScript/TypeScript on both front-/backend. Instead of using another language so you become better coder for JS/TS.

Ответить
Alexandré P
Alexandré P - 22.09.2023 01:13

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

Ответить
AniketGM
AniketGM - 21.09.2023 19:09

Not just Turbo 8, Typescript is removed from Svelte as well.

Ответить
kragil
kragil - 21.09.2023 16:54

Going full midwid? What does he mean? Not a native speaker ..

Ответить
Cassandra Thompson
Cassandra Thompson - 21.09.2023 05:16

I love prototyping in a dynamic language, but if you're maintaining anything that changes, types please.

Ответить
Timothy Roper
Timothy Roper - 20.09.2023 14:11

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.

Ответить
Wolf Man
Wolf Man - 20.09.2023 12:07

JSDoc feels way better than TS without worrying about adding type checks everywhere. Also it is a big headache to do typechecks for a very large codebase. I like the freedom to first code in your style and worry about types later on. If devs worry about types first, then the creativity and the joy of coding will take a backseat.

Ответить
KingThrillgore
KingThrillgore - 20.09.2023 00:18

Remember: Always do the opposite of what DHH does

Ответить
John Gagon
John Gagon - 18.09.2023 23:30

I don't have a bet on this match but I don't enjoy javascript as much when I have to constantly refer to original source to get what arguments and return values do. TypeError cannot undefined/undefined reading undefined/undefined is just undefined aka Null hell. Solve it however you like: FP, OO, code-time docs, but it beats having to hunt down the code taking the args I didn't provide or buried type property that was null and then used for a bunch of function calls. TDD is dying deservedly and while it might be ok for lone rangers, it sucks for a community to have to change horses. I have long hoped that undefined and null will disappear as error causes. I really think we can do better than this.

Ответить
Matt McKnight
Matt McKnight - 18.09.2023 20:57

Let us live in peace in Ruby land without our types.

Ответить
Michael Baudais
Michael Baudais - 18.09.2023 01:43

I mean, the whole point of Turbo is to achieve React-like interactivity without writing JS... No idea why anyone would want to combine that philosophy with TS. If you want to use TS with Rails, it makes more sense to use a React front-end or something, not Turbo.

Ответить
m-ok -
m-ok - - 17.09.2023 17:01

TypeScript is garbage and in the near future, we will look back and laugh at how we used TypeScript.

Ответить
Venom Snake
Venom Snake - 16.09.2023 19:26

using typescript for library dev is a pain but a direct win for the end developer
using vanila for library dev is just transfering that pain to each end dev
Making that choice as a library dev is profoundly stupid

Ответить
Sam Taiwo
Sam Taiwo - 16.09.2023 16:29

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.

Ответить
Charles
Charles - 16.09.2023 09:39

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.

Ответить
Jason Bunting
Jason Bunting - 15.09.2023 19:05

Fuck TypeScript

Ответить
Digital Nomad On FIRE
Digital Nomad On FIRE - 15.09.2023 15:01

I prefer Tuurbo 11, it's 3 better...

Ответить
Digital Nomad On FIRE
Digital Nomad On FIRE - 15.09.2023 15:00

Bro your Microsoft hate is so 2006 🤡

Ответить
Digital Nomad On FIRE
Digital Nomad On FIRE - 15.09.2023 15:00

Implicit typing (eg in (C#) is the sweet spot IMHO.

Ответить
Digital Nomad On FIRE
Digital Nomad On FIRE - 15.09.2023 14:58

You can have too many abstractions

Ответить
bigbear187uk
bigbear187uk - 14.09.2023 17:51

How have I only found your content today 😂

Ответить
Gerbeck S.
Gerbeck S. - 14.09.2023 16:00

All you really need to do is type a functions input and output. That's it. Inside the function, `any` away, nobody cares.

Ответить
Ahbar Ahad
Ahbar Ahad - 14.09.2023 11:07

Javascript a joy to write? DONT ever let this guy cook again

Ответить
Schneefackel
Schneefackel - 14.09.2023 09:51

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…

Ответить
Sandeep Chiluveru
Sandeep Chiluveru - 14.09.2023 07:55

TypeScript is for those clowns who like to do circus with code. If you wanted types so badly you would stick with Java instead instead of twisting up and mangling JS so badly. There is a reason why c, c++ ( ... ), js and perl exist and that is to solve every day real problems. Typescript code looks like somebody let a monkey have a go at the keyboard. And also I suspect that MicroSoft secretly hates Javascript and its success. I am sure there is some interesting bit of history in there somewhere ...

Ответить