Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TypeScript #972

Closed
wants to merge 1 commit into from
Closed

Add TypeScript #972

wants to merge 1 commit into from

Conversation

t3dotgg
Copy link

@t3dotgg t3dotgg commented Sep 6, 2023

By all accounts, JavaScript has been a big success for web development. I've seen loads of people sparkle with joy while working with the dynamic nature of JavaScript, unburdened by the constraints of TypeScript's explicit types. But I've never been a fan. Not after giving it five minutes, not after giving it five years. So it's with great pleasure that I can announce we're dropping JavaScript from the next big release of Turbo 8.

The fact is that I actually rather dislike JavaScript. I'd go so far as to say it's my second-least favorite language after COBOL. Yes, a distant second-least, but a least-favorite none the less. This wasn't always the case. But after TypeScript introduced us to the world of static types, and all the other improvements that came with it, it's become a real pain to write plain JavaScript.

I still don't think JavaScript is well-suited for most of the work we do on the client side of the web-app equation, but fully respect and appreciate that others feel differently. To me, it's simply our misfortune that we still have to work with such an unstructured language, which often leads to runtime errors that could have been caught at compile time.

JavaScript just gets in the way of that for me. Not just because it lacks strong typing, but because it forces us to handle type-related issues at runtime, leading to frustrating debugging sessions and unpredictable behavior. Things that should be reliable become fragile, and things that should be simple become complex. No thanks!

This isn't a plea to convert anyone of anything, though. As I discussed in Programming without types, very few programmers are typically interested in giving up strong typing. Most programmers find themselves drawn strongly to types or not quite early in their career, and then spend the rest of it justifying their choice to themselves and others.

That's part of the challenge of this JavaScript vs. TypeScript debate, and full credit to the JavaScript enthusiasts for realizing that a full take-over of TypeScript was never going to happen, so staying true to the dynamic nature of JavaScript was the way to go. Just because Turbo 8 is dropping JavaScript won't mean you can't write your client code in it, or use any other library that avoids strong typing. We get to mix and match, which is wonderful.

It's also necessary. Because unlike languages like COBOL, which are languages of choice when it comes to legacy systems, JavaScript is a language of necessity when it comes to the client side. While you may use statically-typed languages that compile to JavaScript, you still have to accept the fact that running code in the browser means running JavaScript. So being able to write that, free of any type constraints, and free of any strong typing, is a blessing under the circumstances.

So farewell, JavaScript. May you bring much unpredictability and debugging sessions to your tribe while letting the rest of us enjoy TypeScript in the structured and type-safe spirit it was originally designed: Embracing strong typing.

Full blog post: https://world.evilhey.com/theo/turbo-8-is-adding-typescript-70165c01

This reverts commit 9f3aad7.
@ChristofFritz
Copy link

lgtm

@simon-v-swyftx
Copy link

:shipit:

@embedvr
Copy link

embedvr commented Sep 6, 2023

I'm not entirely convinced that ditching JavaScript is the wisest decision. In my experience, it has been quite beneficial for contributing, and I believe it remains a reasonable choice for code at the library level. The developer experience (DX) it provides can be genuinely valuable and aids in identifying bugs.

However, I understand that it can become frustrating in specific scenarios. Nevertheless, completely adding types (even with JSDocs and/or .d.ts files) represents a regression, adversely affecting both library users and contributors.

@JezerM
Copy link

JezerM commented Sep 6, 2023

LGTM

@lakeesiv
Copy link

lakeesiv commented Sep 6, 2023

W

@TheCodedOne
Copy link

A very well written explanation.

@eoghanriley
Copy link

LGTM

@aakash19here
Copy link

Less GO 💪🏻

@AltwargEvan
Copy link

lgtm

1 similar comment
@25huizengek1
Copy link

lgtm

@austin-karren
Copy link

Love it

@vincent-uden
Copy link

Excellent PR, lots of thought clearly went into the deep explanation

@Tom-Caz
Copy link

Tom-Caz commented Sep 6, 2023

LGTM!

@BalduinB
Copy link

BalduinB commented Sep 6, 2023

seems like a smart move

@Alekzv9
Copy link

Alekzv9 commented Sep 6, 2023

Looks good enough

@i-rme
Copy link

i-rme commented Sep 6, 2023

lgtm

Copy link

@Molnes Molnes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@coado
Copy link

coado commented Sep 6, 2023

Nice!

@hirowf
Copy link

hirowf commented Sep 6, 2023

LGTM

@alienman5k
Copy link

Just fork it

@perfect7613
Copy link

Loved the Explaination!!!!

@Jd4rc3
Copy link

Jd4rc3 commented Sep 6, 2023

Pretty clever

Copy link

@hex2f hex2f left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 💯

@Pammota
Copy link

Pammota commented Sep 6, 2023

PR good

Copy link

@Claudemirovsky Claudemirovsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@janklimo
Copy link

janklimo commented Sep 7, 2023

Ship it 🚢

@eldyvoon
Copy link

eldyvoon commented Sep 7, 2023

Lgtm, pls merge

@hansderly
Copy link

LGTM

@chrissnyder
Copy link

this pr already has been discussed 3x as long as #971. too much discussion, should just merge

@jdforsythe
Copy link

Burn. LGTM

@jpike88
Copy link

jpike88 commented Sep 7, 2023

This PR is taking too long to merge, something as simple and inconsequential as this should have been merged in a couple of hours, tops!

Copy link

@anantsimran anantsimran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For 🍿

@junaga
Copy link

junaga commented Sep 7, 2023

@t3dotgg you know that jsconfig.json > tsconfig.json yet you make a show. is this why no one respects you? take a look at @fireship, he's a responsible creator.

Copy link

@narze narze left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quite surprising that #971 has no JSDocs in it, that's really bad for DX

Copy link

@thammarith thammarith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Greek
Copy link

Greek commented Sep 7, 2023

lgtm

Copy link

@pythongiant pythongiant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@TechStudent10
Copy link

LGTM of course Theo is on it haha

@ThePrimeagen
Copy link

Not gonna be active on Github reviewing typescript PRs tonight. I’m meeting a girl (a real one) in half an hour (wouldn’t expect a lot of you to understand anyway) so please don’t DM me asking me where I am (im with the girl, ok) you’ll most likely get aired because ill be with the girl (again I don’t expect you to understand) shes actually really interested in me and its not a situation i can pass up for some meaningless Github JavaScript degenerates (because ill be meeting a girl, not that you really are going to understand) this is my life now. Meeting women and not wasting my precious time online, I have to move on from such simple things and branch out (you wouldnt understand)

@dhh dhh closed this Sep 7, 2023
@hotwired hotwired locked and limited conversation to collaborators Sep 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet