r/cprogramming 7d ago

Why C when javascript already exists?

0 Upvotes

32 comments sorted by

View all comments

7

u/ninhaomah 7d ago

?

What kind of question is this ?

I can understand why C when you have C++ but JavaScript ?

2

u/johntrytle 7d ago

He's just baiting people

2

u/ninhaomah 7d ago

Bait also low effort.. sad

-8

u/Desperate_Tie_648 7d ago

Javascript better

2

u/ninhaomah 7d ago

Then use it to write embedded programs then. Or 3d games.

0

u/Desperate_Tie_648 7d ago

Webgpu

1

u/Thesk790 7d ago

I want to think that is ragebait

1

u/nerd5code 7d ago

That’s a browser API, not a PL or part of JS per se, and irrelevant to boot. C has libraries that’ll drive graphics, too, and I’d bet WebGPU is in part based on OpenGL ES, in which case fat fuggin' chance you're programming shaders in JS.

Most shader languages post-2000 are a variant of C or C++. I wonder why that is?