●Stories
●Firehose
●All
●Popular
●Polls
●Software
●Thought Leadership
Submit
●
Login
●or
●
Sign up
●Topics:
●Devices
●Build
●Entertainment
●Technology
●Open Source
●Science
●YRO
●Follow us:
●RSS
●Facebook
●LinkedIn
●Twitter
●
Youtube
●
Mastodon
●Bluesky
Become a fan of Slashdot on Facebook
Forgot your password?
Close
This discussion has been archived.
No new comments can be posted.
Load All Comments
Full
Abbreviated
Hidden
/Sea
Score:
5
4
3
2
1
0
-1
More
Login
Forgot your password?
Close
Close
Log In/Create an Account
●
All
●
Insightful
●
Informative
●
Interesting
●
Funny
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
byHognoxious ( 631665 ) writes:
27 people have already pointed out that web devs are fucktards, so I won't. Remember that they took something designed for displaying static pages and shoehorned interaction & dynamic shit onto it. The whole thing is built on sand.
twitter
facebook
bydougTheRug ( 649069 ) writes:
Why are C developers still writing buffer overflows?
byTheRaven64 ( 641858 ) writes:
The performance difference between C and a modern safer language is well under a factor of two. The performance difference between C and C++ using bounds-checked types and smart pointers everywhere is a few tens of percent. Unless you're targeting a system with 32KB of RAM or less, or you have very strict realtime guarantees (and so aren't even using malloc) there's rarely a good reason to use C these days.
bytepples ( 727027 ) writes:
Unless you're targeting a system with 32KB of RAM or less, or you have very strict realtime guarantees (and so aren't even using malloc) there's rarely a good reason to use C these days.
I would dispute this 32 KiB figure.
Several years ago, I wrote a program for Game Boy Advance homebrew that used a single std::ostringstream once, and even after enabling -Wl,--gc-sections, the statically linked executable was 180,032 bytes. It turned out that the constructor for a std::ostringstream in GNU libstdc++ would call the constructors for date, time, and currency formatting aspects of the locale even if I never output a date, time, or currency object. For a scale reference, the GBA's RAM is 32 KiB
byTheRaven64 ( 641858 ) writes:
To counter your anecdote: the SDK for ARM's mBed system is C++ and so is their newer mBed microkernel. Both run on systems with 32KB of RAM. I've written a thing to control the Christmas lights outside of my office that runs on an ARM Cortex M0 and uses C++ templates and some virtual functions to describe a stackable set of transforms that are applied to an LED strip. It uses about 1.8KB of RAM, because I didn't bother optimising it, but I could easily get it lower if I cared (the board has 32KB of RAM).
●rrent threshold.
byHornWumpus ( 783565 ) writes:
C is still a _great_ teaching language. Coders that can't get their mind around pointers should seek employment elsewhere. It's a good filter, even if 90% will never see a pointer again.
C mixed with assembler is still common in embedded.
byTheRaven64 ( 641858 ) writes:
C++ has much more convenient atomics and such
C11 has the same set of atomics as C++11. Even the syntax is almost the same: std::atomic<T> vs _Atomic(T).
The problem with C++ in embedded contexts is that the C++ committee is explicitly opposed to subsetting, yet what you actually want is a subset. You typically don't want exceptions or RTTI, and you don't want locales or a bunch of other stuff from the standard library. You end up not writing C++, but writing some arbitrary subset of C++ and hoping that your compiler / standard library will
●urrent threshold.
bySigma 7 ( 266129 ) writes:
It isn't even hard to code safe in C.
The problem with C is that the unsafe stuff is default. Some of this was fixed over time, but it's taken so long that the unsafe practices are prevalent. Some of the functions later meant to offset this issue are sometimes not found in stock compilers (even if there's an update that later adds them.)
Oh, and I did find a useful feature in one of the compilers. Turns out it was just specific to that one, and I had to rewrite code since it wasn't standard.
Just allocate ins
●nt threshold.
There may be more comments in this discussion. Without JavaScript enabled, you might want to turn on Classic Discussion System in your preferences instead.
Slashdot
●
●
Submit Story
It is much harder to find a job than to keep one.
●FAQ
●Story Archive
●Hall of Fame
●Advertising
●Terms
●Privacy Statement
●About
●Feedback
●Mobile View
●Blog
Do Not Sell or Share My Personal Information
Copyright © 2026 Slashdot Media. All Rights Reserved.
×
Close
Working...