DEV Community


Discussion on: Is C still a high level language?

yujiri8 profile image
Ryan Westlund

To be frank, I think C should not be considered a high-level language anymore and using it for anything besides kernels, interpreters, and like is almost always a mistake.

Have you read Paul Graham's essay Beating the Averages? It's not explicitly about C, but he makes the general point that high-level languages vary in power (heading "The Blub Paradox"), and I think it applies even more strongly to C.

I find it strange that you consider C "as readable as any other high level language". Compare these code snippets:

for (int i = 0; i < argc; i++) printf("%s\n", argv[i]);
for arg in sys.argv: print(arg)

Are these really equally readable to you? This pattern will appear in almost any comparison of C code with equivalent code in a higher-level language.

And to say nothing of the difficulty of debugging and memory safety issues, which seem to behind a huge proportion of security vulnerabilities in C software.

delta456 profile image
Swastik Baranwal Author

C was made earlier than Python so they never thought of using this syntax.

andrewharpin profile image
Andrew Harpin

Python engine is written in C

thorstenhirsch profile image
Thorsten Hirsch

Well, other languages from those days already had the for(each) syntax. Source:

ntrel profile image
Nick Treleaven

Well you can use puts instead of printf, but I take your point. I think readability in C is bad because of type unsafety, no defer statement and void pointers everywhere.