Return

c is not a good language

1 Name: Anonymous 2024-08-24 15:55
i notice a lot of people aggressively defend C at any cost as though it were something to be proud of. mainstream C adoption made software unequivocally worse, the fact we had the technology and capabilities to use powerful, safe, expressive, optimized languages but we all decided that C is easier for compilers and the its shipped with UNIX really fucked us all over.

people who write C either A) don't know what they are missing out on or B) are too industry-rotted to consider anything besides their little compiler-friendly, dust collecting shitware

here is my little hitlist on C:
1) abhorrent type system (we've always had good type systems in ML and to an extent ALGOL derivatives like modula and pascal, but we through that out the window with C)
2) the preprocessor (we literally had scheme in the 70's, yet UNIX devs really thought the C preprocessor was a good idea because idk fuck you)
3) function pointers (i don't really need to explain this one, we have had higher order functions for fucking decades before C)
4) a module system (some compilers of pascal added modules around the time of the release of C, FORTRAN had them too, but C designers that the foresight that people may want to group their code... despite the numerous papers advocating for modular design patterns)

anyways, tell me why im wrong :3
2 Name: Anonymous 2024-08-25 02:32
I would never defend C as "the best" language. Only that it is better than any reasonable alternative.
Unfortunate as the case may be C's dominance terraformed the entire industry from the silicon up. It shaped the design patterns that architecture designers would use going forward. It also directly inspired every langauge to come after. Much in the way of Tolkein in fantasy works after him, or mount fuji in japanese art. Even those programing languages that come after today that aren't C like, are conspicuous in their divergence from the standard it set.

Would a world where lisp machines became the norm had been a better one? perhaps. Unfortunately we will never see such a world, we can only run lisp in a VM on top of a C based silicon architecture.

there may be arguments that haskall, is a better reasonable alternative. But lets look at the landscape a bit.
amoung the most popular langauges we have Rust, C#, Java, C++, Python, JavaScript, TypeScript, Go, Objective C, and lets throw in Zig too for fun.

all of these try to be "a better C". Every. Single. One.
Just one problem tho. They all do this by building a house of abstraction on top of what is really under the hood.
lets create a weird compile time check on variables because we are too dumb to use a semaphore!
lets create a huge type system that requires all kinds of checks for type compatability and promoting every single time in our JiT and parsed languages, even tho I know exactly what types they are and that they are compatible because I'm writing the damn code.
the list goes on.
now we also have to consider what is "meant" by C. K&R? C89? C99? C11? C23? all of these are vastly different and frankly everything after C89 is as irrevocably brainrotted as everything C inspired.

re type system. It's all bytes man. i dunno what to tell you. everything beyond "byte" is syntactic sugar. we use numbers a lot, so it's nice to have signed, unsigned, floats, etc. it's nice to be able to interpret 8, 16, 32, and 64 bits as numbers because (amazingly) that's what our actual silicon can operate on. 128 bit adds needing some big math lib to add to the base language is fine, because there aren't any 128 bit adders on your chip in "current year". handle that shit as you will.
strings are too common not to include, unfortunately. the only problem is char has an implicit ascii bias, which is totally useless. (if only there was a C variant made by the people who made the original unix which had unicode as a first class citizen but isn't brainrotted plan9 C exists, oh and HolyC too i guess )

yes the preprocessor is retarded. use it as little as possible.

function pointers are a problem? well. i have an address in memory. and ima just load that address and call it. wow that's a function pointer! holy shit. you want to not have this very basic asm level feature?

what the hell is wrong with compilation objects? we have to remember the entire point of C is to be an easy way to write assembly. code is nothing more than bytes that get stored in memory. might it be nice to hot swap execution objects on the fly at run time? sure. and you can in fact do that. Your self. As you should. Because that's how you would need to do it in asmbly. for other things dynamic linking... like... exists.... maybe im not fully understanding your module system point. literally no one is stopping you from breaking your code into different .c and .h with exports.

That all being said. A symbol based language with strong type system could be better. completely forgoing similarity between the underlying system and the human interface with a powerful language could indeed be great. there simply aren't any good alternatives.
3 Name: Anonymous 2024-08-29 05:03
nah C is goated. only thing better than C is hand punching cards and mailing a stack to a mainframe 3000 km away and waiting 2 months for them to fax back the error message my hand punched code returned.
4 Name: Anonymous 2024-09-20 18:54
Scheme and languages like it did NOT have the performance back then to be used for writing operating systems. Ultimately C is a language of tradeoffs. There is no individual part of language design in which it was beat out by its contemporaries, but the compromise between high and low-level programming with an emphasis on performance made C amazing for the time.

That being said, I wouldn't use it now lmao. I think it should be respected for what it did for the field of technology and left in the past
5 Name: Anonymous 2024-09-25 12:36
You claim to dislike C but yet you use computer that uses it.. how curious
6 Name: Anonymous 2024-09-25 15:19
It's a shame that C is often misused for tasks where a higher level language whould be a better choice. However, you have to keep in mind that performance does not come out of nowhere, and things are fast usually because of the various optimizations applied by the programmer which are only possible because of the language that does not abstract things away.

Basically my point is that you shouldn't throw C away completely, neither you should to blindly ignore other options. Every tool has its reasonable scope of application.
7 Name: Anonymous 2024-09-27 07:50
8 Name: Anonymous 2024-09-28 17:10
>>7
da fuck did you just make me read?
9 Name: Anonymous 2024-10-20 03:03
>>1
I haven't written anything in C since I came out to my parents! God bless!
10 Name: Anonymous 2024-10-25 23:09
>>9
good one
11 Name: Anonymous 2024-10-26 19:28
>>9

As a Lisper?
12 Name: Anonymous 2024-10-26 23:32
C is the most flexible cross-platform macro-assembly macro ever conceived.
Around the time C became industry standard was when software developers were most incentivized to shift their attention from other platforms towards the IBM-PC.
These systems had the fastest growing userbase compared to other mid-range mass market systems while having the most extensive development software library commercially available by the mid-to-late 80's; all this made it easier than ever for a fledgling start-up to publish software quickly without needing to get bogged down in having to write most of it in assembly.
The x86 instruction set was designed to allow C or pascal to be compiled easily by including an interrupt vector table, call and return instructions, memory segmentation, as well as indexing and stack pointers in its architecture.
Inevitably by the early 80's dozens of somewhat convention-compatible C compilers were made by independent groups of developers who wished to port C code from other systems to make available to the existing IBM-PC assembly/pascal/forth codebase.
As far as C being an all-purpose high level language like lisp it is garbage, but given that it can implement most all programming languages efficiently with reasonable portability ON BARE METAL made it stick around.

Return
Name:
Leave this field blank: