You are viewing a single thread.
View all comments View context
56 points

Did it work? How do you know that? A consumer of your package sends a int when your package expects a string.

What now?

permalink
report
parent
reply
45 points

Consumer just needs to write 4x as many unit tests to make up for lack static typing. Hopefully the library author has done the same or you probably shouldn’t use that library.

permalink
report
parent
reply
2 points

It’s ok, just do what my company does and write no tests at all!

permalink
report
parent
reply
6 points

4x as many unit tests

Well… the people fighting against TS are simply not testing things thoroughly. So they are not writing those tests.

Some times that’s even perfectly ok. But you don’t want to build things over a complex library that has this attitude.

(Except for svelte. It’s meaningless for svelte, as TS was always a really bad fit for it.)

permalink
report
parent
reply
-17 points

Theoretically, they’ll test and notice that doesn’t work and fix their code before they deploy it to production.

permalink
report
parent
reply
6 points

Where can you point to other developers evidence that the code in git matches the code you deployed? Deploying locally built packages to prod is an automatically fireable offense because its not auditable

permalink
report
parent
reply
0 points

WTF are you talking about? All I’m saying is that if you write code (that in the context of this discussion passes arguments to a method you didn’t write, that may not be the type the author of the method expected someone to pass, but really, that’s completely beside the point), you should, oh, I don’t know, maybe test that it actually works, and maybe even (gasp) write some automated tests so that if anything changes that breaks the expected behavior, the team immediately knows about it and can make appropriate changes to fix it. You don’t need a strongly typed language to do any of that. You just need to do your job.

permalink
report
parent
reply
34 points

Hey man it passed the CICD. Not my problem

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

  • 2.9K

    Monthly active users

  • 1K

    Posts

  • 38K

    Comments