Hacker News new | ask | show | jobs
by baby 2771 days ago
The problem is that nobody new to the scene wants to write C anymore. It's not a secure language, it has no convention and is full of hacks. On top of that it has undefined behaviors and is supported differently by different systems.

Nowadays people want to write in Go, Rust, Swift, etc.

3 comments

Fortunately not everyone makes technical decisions using the wisdom of crowds.
If people would switch to Rust and stop writing C the world would probably be a safer place yes.
Given Rust's spotty platform support[1], I don't see that happening anytime soon.

[1] https://forge.rust-lang.org/platform-support.html

It's possible to write unsafe code in any language.
Come on... C doesn't initialize memory, doesn't manage memory, doesn't verify bounds for buffers, etc.

It's especially unsafe to write C.

Thats why we have Java / Rust / Python / CSharp.
My point.
C is so much fun though. Having so much direct control over everything, no layers of abstraction clouding your view, is incredibly enjoyable in the right context.
Which scene? You still learn C to get work done with hardware, like it on not.
For strange that it may seem to youngsters, that capability is not unique to C.

https://www.mikroe.com/mikropascal-pic

https://www.mikroe.com/mikrobasic-pic

http://www.astrobe.com/default.htm

https://www.ptc.com/en/products/developer-tools/apexada

https://www.ghs.com/products/ada_optimizing_compilers.html

Some examples of non-C languages used in production code for doing stuff with hardware.

Not going to spend $250 on an ugly looking IDE that forces me to work on a Windows PC.
Then better not work on tne embedded industry, as that is the OS of choice for like 99% of the SDKs, even C based ones targeted at Eclipse CDT.

Which I guess is also beautiful then.

And you'll struggle upstream if you go that route. Pretty much all vendors for embedded platforms only provide C libraries/drivers/examples/subsystems/documentation.
The compiler vendors I listed are vendors for embedded platforms, they also sell boards.

The problem, as expressed multiple times on C++ conferences, is the devs that are religiously against anything that isn't C89 + language extensions + Assembly.

I'm 41 and work in embedded, but thanks. There's approximately zero people in the trade who don't know or never used C. And you certainly know this.
Sorry about that then.

Surely I know that, but there is this image being sold that C is the only option, when those companies that I have listed are in business for at least 20 years now.

I also know there are a large amount of people in the trade that have zero regard for writing secure C code, despite the availability of tooling to help in such regard.

Which is getting worse now that those systems are being plugged into the Internet.

Sure, I've seen embedded work done with anything from assembly to Lisp. But it's all marginal, trying to get into embedded development without learning C would be very career limiting. For example, not sure how many new projects are started in 2018 with Pascal on PIC but suspect not a lot.

Perhaps the most popular non-C development platform these days is Arduino on Atmel 8 bit chips, but it is still really a dumbed down version of C(++).

Actually Arduino is one way I hope that C++ gets more embedded love.

Either that, or certification requirements like AUTOSAR that have switched to C++14.

Looks like Rust is starting to become the hardware language
There is a lot of hype and no industry penetration so far. Things may change certainly, and it's not the worst thing to happen.