News for hackers. Stuff that matters.
Re:Why aren't there C conferences? (2018) by pizza234 on Friday August 26, 2022 @01:12PM (#32610183)
I've worked on porting a program written in C to a memory-safe language.

On the very first run of the port, immediately, I've found a bug due to C weak typing. After a few days, I've found a few buffer overruns.

My take is that there are two types of programmers: those who admit they can't avoid making memory safety mistakes, and real programmers, who don't make such mistakes, and happily keep programming in C/++.

EDIT: Just for fun, I've randomly picked up another C program, written in C17/C18. Immediately found a bunch of problems (not sure if there is any impactful, or not), including inconsistent function prototypes.

Re:Why aren't there C conferences? (2018) by alerighi on Friday August 26, 2022 @08:08PM (#32614209)
Memory safety issues are not always an issue. What I mean is that having memory safety is not everything, since a system that is memory safe can still contain bugs, and vice versa a system with memory related issue can function perfectly for years, because they are corner cases that are difficult to get into.

Of course there are cases where memory safety issue cause security problems, but not in all cases. If for example by a very uncommon sequence of keypress on my washing machine I cause a buffer overflow, worse case scenario the microcontroller hangs and I have to unplug it and plug it back in again (but hopefully there is a watchdog that resets the processor automatically). A lot of C programs don't even have an user interface, because for example are embedded in device that has no external input (for example a microcontroller that manages the operation of a power supply).

Re:Why aren't there C conferences? (2018) by pizza234 on Wednesday August 31, 2022 @07:24AM (#32660763)
Even ignoring memory safety, C allows a lot of footgunning. I've found another source of grief to be weak typing and operators priority. I was very surprised to find bugs in the Linux kernel examples.
Re:Why aren't there C conferences? (2018) by copperx on Friday August 26, 2022 @06:12PM (#32613341)
> My take is that there are two types of programmers: those who admit they can't avoid making memory safety mistakes, and real programmers, who don't make such mistakes, and happily keep programming in C/++.

I absolutely agree. There's a class of programmers that would rarely if ever make such mistakes (e.g., Torvalds), and to them, C is freeing.

For the rest of us lesser programmers, the handrails of a borrow checker are necessary.

Re:Why aren't there C conferences? (2018) by nickysielicki on Friday August 26, 2022 @07:59PM (#32614154)
Re:Why aren't there C conferences? (2018) by glandium on Friday August 26, 2022 @07:50PM (#32614098)
I'm pretty sure that was sarcasm.
Re:Why aren't there C conferences? (2018) by jstimpfle on Friday August 26, 2022 @01:56PM (#32610702)
Mind sharing what is the project that you picked?