r/programminghorror • u/mrmcgibby • Aug 18 '26
c [ Removed by moderator ]
/r/programminghorror/comments/1vr9mbz/removed_by_moderator/[removed] — view removed post
6
u/keithstellyes Aug 18 '26
I mean, calling a decision that made sense in the context of its time and works perfectly fine in practice for most apps even now, a "mistake" is going to be engagement bait
1
u/Amerillo_ Aug 18 '26 edited Aug 18 '26
I had to build an encrypted database as a project in C in university and I really hated every second of it. I worked on some projects in Java, Rust, C#, Kotlin... Heck even Visual Basic 6, and I enjoyed those soooo much more. Could someone explain to me why they like it? I'm genuinely trying to see the appeal (of C) but I can't
3
u/keithstellyes Aug 18 '26 edited Aug 18 '26
Why do people like C? Or why do people like C strings? The latter I think besides having the nice property of being able to be indefinite size (though some would argue this is a risk ;( ) are also just simpler implementation/easier to understand exactly what's happening at a low level
1
1
u/Environmental-Ear391 Aug 18 '26
C is iterated from B/BCPL/fortran and similar previous languages.
Do you want to discuss the language itself in a modern context or are you wanting to debate libraries available?
In language terms,
It is both functional and supports OOP indirectly. (You need to declare function pointers and layer an additional set of functions to specifically use these in a standardized way based on whether you choose to "black/white" publish the structures which use the OOP implemented)In library terms... Windows (most versions) starts with a core system written in C with additional languages libraries expanding this core. (Explicitly: C# requires this core system and expands it)
Linux Kernel and glibc/musl/newlib and additional core packages are also in C...
There is no restriction on other languages sharing some context and using these core packages objects as linkable material.
GCC requires the C language as a first portation for other languages to follow.
If the string support seems a mistake... write your own handling and replace it.
C string handling has few or no base rules that are mandated as "must" comply... the standard string handling is all additional standard library material based on a minimal few language specifics (pointers and arrays)
The simplist main strength is the core language is minimal and everything else is programmer selectable (or you can write you own if you feel nothing else quite fits).
Each language of an era has its strengths and weaknesses, C is at its core minimal with everything else "gravy".
1
u/GoddammitDontShootMe [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo "You live" Aug 18 '26
I really don't think this was a mistake in the 1970s. And also this violates Rule 1.
•
u/programminghorror-ModTeam Aug 18 '26
We have decided to remove your post, because it does👏 not👏 contain👏 code👏 . If your post does contain code, feel free to message the mods through the modmail.