r/cpp • • Jan 09 '22

James Web Space Telescope runs on C++ code.

https://youtu.be/hET2MS1tIjA?t=1938
729 Upvotes

185 comments sorted by

View all comments

281

u/Resurr3ction Jan 09 '22

Why is this comment section full of unintelligible blabbering and idiocy? This sub is usually pretty on topic and professional. Also I don't understand what is controversial on having critical infrastructure running code written in the same language most other critical infrastructures use?

265

u/liquidpele Jan 09 '22

We are in the age of webdev where thousands of people who went through some react tutorials think they know enough to comment on a 20 year NASA project.

57

u/Zirton Jan 10 '22

people who went through some react tutorials

Those people learn a new framework every week, because the old ones become obsolete.

Yet they talk shit about NASA engineers, how could probably fire something into space, with a rocket coded in brainfuck.

→ More replies (4)

9

u/[deleted] Jan 29 '22

I JUST WANT TO LIVE IN 2014 AGAIN FFS, TIRED OF UDEMY "PROGRAMMERS"

→ More replies (4)

101

u/Kazumara Jan 09 '22

The thread was cross posted to /r/programming, maybe that has something to do with it.

21

u/boredcircuits Jan 09 '22

I don't know. That thread is more sane than here at the moment.

63

u/sigmabody Jan 09 '22

Came here to see this, not disappointed, kinda impressed that it's the top comment (at time of this response).

Virtually all code for systems which "have to work" in the world now is written in C or C++. Industrial, automotive, finance, supply chain, space, etc.; it's a long, and nearly ubiquitous list, and it is that way for a reason. There are numerous other popular/newer languages and paradigms which are "the cool new thing", and then there are the languages which you write code in for applications which are not just for-fun or limited scope projects.

That's not to say it's impossible to write commercial applications in other languages, especially on top of solid foundations written in the "solid" languages (eg: many web services are written in managed languages running inside frameworks written in C/C++, and running on OS's written in C/C++). But for the "real" stuff, the code which needs to be robust and work predictably and reliably, C/C++ is still the gold standard.

17

u/tarranoth Jan 09 '22

Well, you wouldn't write embedded stuff in anything other than C/C++ right, which seems to be mainly the industries you are listing. I don't think this has to do with "has to work" but just that you are kindof limited in what you can even use.

3

u/hotoatmeal Jan 09 '22

Rust is gaining a lot of traction for embedded

21

u/tarranoth Jan 09 '22

It's gaining some traction, but it is a little bit limited with the llvm backend. I know there is the gcc experimental stuff, but I'm not entirely convinced that that would make people write rust instead of C. I think for stuff like raspberry (or basically any thing that at least still runs an os), it might see usage, but I don't think it makes much sense for bare metal.

7

u/rswsaw22 Jan 10 '22

I also think for any memory mapped hardware you need to use the unsafe keyword to access it. Which ruins the big selling point of Rust, its safety. And as someone who works in the embedded space, Rust is a hard selling point when it doesn't have vendor supported tools. It's a pain to self wrap a dev environment for a uC and it is just easier to reach for C++ when I want better type safety as I can just use the vendor provided IDE and debugger.

→ More replies (2)

10

u/PL_Design Jan 10 '22 edited Jan 10 '22

No, it's not. The crabs just keep saying it is and people who don't know any better repeat it. Rust has as much to do with embedded as Common Lisp does.

4

u/pjmlp Jan 10 '22

http://www.ulisp.com/

Naturally one can assert that Arduino, Adafruit M0/M4, Micro:bit, ESP8266/32, RISC-V, and Teensy 4.x boards. isn't embedded or that uLisp isn't Common Lisp.

2

u/PL_Design Jan 11 '22

You can use Rust and CL in embedded environments, but it's a niche thing. That's why I compared Rust to CL.

→ More replies (5)
→ More replies (1)
→ More replies (2)
→ More replies (6)

6

u/hak8or Jan 09 '22

Hm, it doesn't seem that bad? It's only ~7 top level comments that have been downvoted into oblivion. For example the zero effort post by by /u/AnotherCableGuy of "Oh shit.." is downvoted pretty hard, the one by /u/grewil that has a smidgen more effort but still low effort, and the nonsense joke post by /u/AthanatosN5 all got downvoted pretty hard.

I think you and others came here when the post was still very fresh so the community didn't get to filter the posts yet.

7

u/AnotherCableGuy Jan 09 '22

Jeez only now noticed, was just joking guys.. I'm a c++ coder myself.

5

u/foonathan Jan 09 '22

Moderation is also slow on the weekend, but we've since cleaned it up a bit as well.

3

u/grewil Jan 10 '22

Yeah, no more joking for me neither, I thought people would get a joke. I am a coder myself and make a living of cpp.

→ More replies (1)

13

u/alkavan Jan 09 '22

I think many people might not be aware both C and C++ are the only programming languages their implementations are defined by an ISO standard. Companies who build mission critical software cannot allow themselves to use something lesser than that.

5

u/blelbach NVIDIA | ISO C++ Library Evolution Chair Jan 10 '22

Nope! There's many other languages that have ISO standards, like Fortran, Ada, and COBOL.

5

u/Caesim Jan 09 '22

I wouldn't say C and C++ are the only ones. The C# language is also defined by an ISO standard: https://www.iso.org/standard/36768.html

7

u/alkavan Jan 10 '22

Status : Withdrawn

Publication date : 2003-04

I'm not sure it counts if it was not published =]

→ More replies (12)