I keep hearing that C is no longer a High Level Programming Language because it is no abstractions, has pointers, have to handle memory on our own, no string data type, unsafe etc.
Do you think that C is not a high level language anymore? I am against this because it's still readable as any other high level and usable as ever and has many libraries and still been updated.
Latest comments (77)
Who cares whether it's a high or low-level language? What problem does giving it that label solve?
But if you think it's truly low-level, you haven't understood microprocessors since the 1980s.
This is a tricky thing if I may say so. Even Go for example has pointers etc and needs some memory management handling. Some people call it a high level language and others mid level. Never ending arguments to follow
C was designed as a low-level language with high-level constructs. Brian Kernighan and Dennis Richie needed a language to write Unix in. BCPL, B, and rational fortran - ratfor all contributed to the language now known as C. C is meant to be unsafe and have flexible rules. It was so by design.
It was one of the early universal assembly languages.
I do get what youre saying, and tbh I didn't realize people were actually get egotistical or at all heated in this.
I don't think assembly is the right word for it, thats all.
It is portable, and does allow for many features that map easily to assembly,
even in some cases allowing for the register keyword etc (although it isnt always guaranteed)
I just think portable and assembly are opposites as assembly programming is very much about familiarity with hardware and programming a specific machine.
Thomaz,
Don't you remember asking for those examples? :)
That is true, but these aren't exactly standardized, and I usually think of them as assembler features as opposed to a "language feature"
I wouldn't really count something as being a part of assembly if it wasn't something directly linked to the actual nmeonics
Every CPU has a memory model, but other than that you've done a good job of demonstrating why C isn't a portable assembly. :)
Beyond that, if you believe that C has a very strong correspondence to every machine code instruction set, then you believe that every machine code instruction set has a strong correspondence with every other machine code instruction set.
This is simply not true -- let's consider a forth machine.
Or if that's not enough, consider one which runs befunge in hardware.
Now let's consider your example operations.
What do you believe this is required to translate to?
When you've done that, let me know what you think this does:
And then let's finish up with a more interesting example.
What does calling this do?
What does an assembly require?
So, what do you mean by "assembly"?
And how does C qualify as one?
It's becoming more of a high level language as time moves on and hardware evolves in ways C programming model doesn't account for (GPUs etc), while compilers evolve to take better advantage of C's abstractions (e.g. compilers remove calls to memset because they are "useless" under C model even if the programmer thought they were wiping out a password from memory)
You do have abstraction, in that you have types, structs, etc, which no actual assembly would have. Variables of different sizes etc.
Next question, "Did Adam have a belly button?"
To me this is along those lines.
The discussion leads no where.
And reality doesn't change one bit.
Choose the language you need/want to do what you need/want.
Someone below was commenting on how C# could be as/almost as fast as C. So what.
There's defintely one thing C# can do that C can't do...
Be thrown in the trash and no longer supported by Microsoft.
If one day MS decides the .NET Framework is "old news" AND they come out with a TNG Programming Structure using a new SeaStar language... they can end-of-life C#.
(Been there done that!)
C on the other hand will likely endure, due to its place and popularity in the history of programming languages.