r/ProgrammerHumor • • Mar 20 '24

Meme areJSDevsActuallySane

Post image
14k Upvotes

554 comments sorted by

View all comments

Show parent comment

0

u/Quito246 Mar 21 '24

Yeah sure, why not to write tests or waste time by testing something, which could be tested by compiler in any sane language🤷‍♂️

3

u/[deleted] Mar 21 '24

what? you solely rely on compiler/linter to know if you really passed the correct variable or not? You didn't test your code atleast once?

1

u/Quito246 Mar 21 '24

No what I mean is that I do not have to write type tests like insane person because compiler is doing that and I only write business logic tests which actually bring value.

3

u/[deleted] Mar 21 '24

Honestly, this is just skill issue. Just setup linter like eslint and you're good to go

Or just use typescript

0

u/Quito246 Mar 21 '24

Yeah so your solution is just to use different language great. But linter also does not save you from some random type casts sooo.

2

u/[deleted] Mar 21 '24

What do you mean by different language? Have you copied java code and successfully compiled it on c++ compiler?

Typescript is no different than JS, but a superset/advanced version of JS. It's litterally written on typescript's home page. You just need to read it.

The problem is you're not familiar with JS ecosystem and how to use it.

You don't need to use typescript to typecast JS. You can use JSDoc to do that if you don't know how to use Typescript.

0

u/Quito246 Mar 21 '24

Sure sure so you just have to use essentially a new language which transpiles back to JS. And create JsDoc but it still wont save you from retarded type casts. So you have to do all that extra stuff to make the language just a little bit less retarded. Wow I am sold such a great language. When I compared It with e.g. C# do you know what I need to do to not make the language not to act in retarded way? Nothing. Cool hmm?

2

u/[deleted] Mar 21 '24

What? you really comparing C# with all tool chains with JS without using its toolchains? You can write JS code from notepad and load it directly on a browser without passing it with linters/transpilers. Can C# do like that? If you need all fancy toolchain setup then you need to set up your local dev environment. Just like other languages, you need to setup all the toolchains that you need before you start working with it professionally

0

u/Quito246 Mar 21 '24

Sure like I cannot create a .cs file and run dotnet run command from console… Because all the heavy lifting in C# is done just by compiler. I do not need any linters or superset of the language i can run the dode from notepad as well and have all the good stuff soooo🤷‍♂️

2

u/[deleted] Mar 21 '24

Well that's it. You're comparing a language with compiler to a language that doesn't need one to run. But when there's an option for a compiler/transpiler/linter, you don't want to use it? lol. The browser is not a compiler. So when you run the JS code, it won't check your code for you. It will just try to run it. Setting up a compiler is dev's task. You don't force your users to setup a compiler on their computers to check your code for you lol. The user only needs to download the runtime environment and you just need to spit out codes that works on their runtime

→ More replies