111 points
*

Me, who’s not in web dev:

permalink
report
reply
7 points

Web development needs a whole lot of change and these kinds of fights are meaningless indeed.

permalink
report
parent
reply
108 points

What Typescript drama is there? It’s fantastic. It’s been an industry standard for years. In my anecdotal experience the only people that hate it are juniors who did pure JS at their bootcamp and seniors that have refused to learn anything for the last 5 years.

permalink
report
reply
74 points

DHH (guy who founded Ruby on Rails) ripped typescript out of a supporting library and swapped it for JavaScript. He did it in his typical fashion of not allowing discussion and being a dick (PR only open for a couple hours and then merged disregarding all the negative feedback about the change) . So people are mad at him again.

He does stupid shit like this all the time because he’s a fucking knob.

permalink
report
parent
reply
43 points
*

RoR will always have a special place in my heart, but yeah… DHH sure does have opinions. What possible justification is there for removing it when it’s already there? Guess someone could just shift the types out to DT.

Edit: So I read his blog post about it. He’s dropping it because he just doesn’t like it and he’s allowed to not like it. Okay then 🤷

permalink
report
parent
reply
17 points

His blog to me sounds like he did it because it was too difficult for him to understand a few errors. Says it all.

permalink
report
parent
reply
4 points

From his blog post:

While you may compile dialects into it, 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 tooling, and free of any strong typing, is a blessing under the circumstances.

By his logic, JS linters are bad because they’re tooling that restricts your access to all of Javascript. But linters mean you don’t have to read PRs with a fine tooth comb to make sure there’s no footguns like using == instead of ===.

Also, you could use that same logic to advocate for writing JVM bytecode directly instead of Java/Kotlin/Scala/Clojure/etc.

The question is really whether tooling pays its way in terms of lower bug rates, code that’s easier for coworkers to read, and code that’s easier to reason about.

permalink
report
parent
reply
8 points

As a general rule, if DHH says something, the opposite probably has some true merits.

permalink
report
parent
reply
24 points

or people used to work alone never having to go back to their code (e. g. bad consultancy jobs)

permalink
report
parent
reply
19 points

Even alone I find it indespensible. I find it’s mainly useful for writing code correctly the first time around.

permalink
report
parent
reply
-1 points

Some people think better with typing information explicitly written out. Some people don’t. In my opinion it is a creativity thing. Some people like to make art that is photo realistic, some people like to make abstract art.

I understand both viewpoints. In my free time I vastly prefer late bound, dynamically types languages with robust reflection engineers built into their interpreters. For work, I heavily prefer late bound, strictly typed with reflection optional or minimal.

Different people think differently.

permalink
report
parent
reply
4 points
*

TS is amazingly powerful when it comes to refactoring. I swear it practically writes itself. Half the time by the time I fix all the compiler errors the refactoring is done. I barely need to think about it which means I can spend more time thinking about the best architecture. When people say they don’t see how TS makes you more productive it just makes me think they never refactor their code.

permalink
report
parent
reply
13 points
*

Svelte decided to ditch it because it became impractical due to the compilation step slowing down development and making debugging their compiler harder. I think for libraries it makes sense to go the jsdoc way as long as consumers can choose typescript.

permalink
report
parent
reply
7 points

Am I the only one scratching my head trying to understand why Svelte supported it at the first place?

The TS type system is not a good match for the project.

permalink
report
parent
reply
3 points

I feel like there’s no typescript drama, just JavaScript drama. Things are pretty happy in the TS community. I’ve been writing js code since it literally first came out. I’m definitely no js hater. In the early days js code bases quickly turned to spaghetti code, but I genuinely think the js community has done miracles turning what was essentially a super simplistic toy language into a seriously good production quality language. I’ve seen first hand how much work has gone into it, and while most of the js community has been great with embracing change for the better, there’s always been the niche of detractors against any change that adds complexity even when it makes coding safer and more productive.

I’ve always had a love hate relationship with JavaScript, but with typescript it’s really been just straight up love. Pretty much all the trouble I have with typescript has been due to external libraries that use types lazily or incorrectly, and even then there are solutions to add safety to your own codebase. Sometimes I run into some trouble with the type system itself, but it’s pretty much always because I’m doing something really complicated that would be hard in any type system. I’ve been working with typescript for years now and my code bases are some of the most solid ones in my company. Typescript is really safe as long as you’re actually using it and not telling the compiler to ignore types through using any or making unsafe assertions.

It makes no difference to me if other people prefer JavaScript. Any important js library will get ts support anyways through definitely typed, and if a library is so sloppy it can’t be typed well then it’s not a good library to use anyways. Having people proudly announce they only want to use JavaScript is also great for hiring. It easily tips me off on who not to hire.

permalink
report
parent
reply
-2 points

I refuse to use it because it is backed by Microsoft.

permalink
report
parent
reply
4 points

I can understand that. Does it’s open source status not change anything for you?

permalink
report
parent
reply
-1 points

They have a vert high chance of pulling slack.

permalink
report
parent
reply
-2 points

If it’s dumped under an open-source license, but still developed exclusively by one corporation, they can swap out that license pretty easily.

permalink
report
parent
reply
69 points

I’m choosing the third side: WebAssembly

permalink
report
reply
35 points

Blazingly fast 🦀🦀🦀

permalink
report
parent
reply
4 points
*

Incredibly powerful type system λλλ

And the best part, those two interop better than in native code.

permalink
report
parent
reply
1 point

those two interop better than in native code

Really? Why is that?

permalink
report
parent
reply
13 points

You can even compile Fortran code to wasm and run it on a web browser. Who need Javascript’s puny 64bit floating point precision when you can have Fortran’s superior 128bit floating point precision?

permalink
report
parent
reply
6 points

Have they finally dumped the required js stub loader?

permalink
report
parent
reply
10 points

No, but GUI frameworks can generate it for you. Same goes for DOM access, for which there’s normally only a JavaScript API.

So, you’ll likely want to read JS, when researching what events or properties you can read/write for certain HTML nodes in the DOM, but with a mature GUI framework, you should not need to write any JS.

permalink
report
parent
reply
62 points

vanilla javascript? what are you, fucking Amish?

permalink
report
reply
61 points

I’d rather stay out of the frontend all together but I’d rather chop my balls off than go back to JS.

permalink
report
reply
21 points
*

Plot twist: You are transgender and love working with JS

permalink
report
parent
reply

Programmer Humor

!programmer_humor@programming.dev

Create post

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics

Community stats

  • 3.3K

    Monthly active users

  • 1K

    Posts

  • 37K

    Comments