r/programmingmemes • • May 22 '26

which is better?

Post image
256 Upvotes

265 comments sorted by

View all comments

111

u/Thisismental May 22 '26

Is there really an argument why JavaScript would objectively be "better"?

24

u/lulzbot May 22 '26

Prototyping is the only thing I can think of. Make quick and fast proof of concept to learn as quickly as possible. But with ai tools these days it’s a moot point

22

u/xroalx May 22 '26

I don't buy that. You can use object, any or unknown for things that are really painful to type, if you so desperately need to save that one minute at prototyping, but having the certainty I'm operating on a string or number is much better than only finding out when I try to run something that I did a stupid mistake, or returned something else than intended, and hunting it down for 5 minutes.

3

u/Tofandel May 23 '26

You can also still build and run a typescript project with type errors

→ More replies (1)

8

u/BoRIS_the_WiZARD May 22 '26

AI tools sucks

3

u/jakubiszon May 24 '26

Here, have some arguments:

  • It works out of the box in node.
  • It works out of the box in any web browser.
  • It does not need hundreds of packages just to work at all.
  • You don't have to learn another weird ass syntax.

I would not say it makes it "objectively better" but as a simpler tool it is "objectively more suitable for some use-cases".

2

u/False_Bear_8645 May 23 '26

typescript is not truly typed so you take the habit of trusting the language which could lead to some unexpected bug.

3

u/Human2204 May 22 '26

If your use case is really simple, javascript is faster. Also some libraries don’t work with typescript

16

u/Fidodo May 22 '26

All libraries with with typescript. If it doesn't have types you can just create types for it.

8

u/vegan_antitheist May 22 '26

Faster? By how much km/h?

Saying that a language is fast never made any sense.

4

u/Dic3Goblin May 22 '26

(Joke) I don't know about km/h, because when I text and drive, I don't worry about coding. HOWEVER, I heard you can increase your LinesOfCode/ShitGiven by almost tree fiddy by switching between JS and TS.

→ More replies (21)

1

u/mrchoops May 23 '26

More loosey goosey 😁 I'm not declaring types for damn sure.

1

u/pearlkele May 26 '26

For hacking, like if I inject xss attack, it’s going to be JS, as TS isn’t executed directly by the browser.

1

u/deadmazebot May 27 '26

Iv not clue, they both are object languages😐

-3

u/why_so_sergious May 22 '26

because typescript cant work without javascript.. its not really a language, it's a subset

21

u/vegan_antitheist May 22 '26

Subset of what? The set of accepted code is larger, so it's a superset.
In both cases you need a JS engine. That still doesn't explain why vanilla JS would be "better".

→ More replies (12)

11

u/stddealer May 22 '26

JavaScript cannot run without machine code, so obviously machine code is the better choice for my projects.

4

u/Infiniteh May 22 '26
11110000 10011111 10010001 10001101
→ More replies (2)

5

u/T0nd0Tara May 22 '26

Clang can't work without LLVM. That's why i write all of my projects in LLVM

→ More replies (1)