4 ms·
> web development, mobile and enterprise That's why I included Java, C# or Javascript. If you can read those languages you can read C. And it's not the langua
by gjulianm 7y ago
> web development, mobile and enterprise
That's why I included Java, C# or Javascript. If you can read those languages you can read C.
And it's not the language what they need to understand. C in itself is a fairly simple language, that's why I said that any person with experience in that family of languages would be able to read it straight away. What one should understand is how the computer is doing what you ask it to do. What does "create an object" mean, what is a "reference to an object", what are the heap and the stack, etc. These are concepts that are extremely useful and, as the parent comment said, almost required to know in order to be a full programmer and be able to understand what happens when you create your programs.
- blub 7y agoAny JavaScript or C# programmer will understand the ifs, elses and fors, but that doesn't mean they'll understand what the C code does or whether it's correct - two essential aspects of reading code. I've been doing C++ for more than a decade and had two tough experiences lately: * I had to review a C project of several thousand lines. It's impossible for a human to understand if memory management is done correctly without weeks of deep analysis, so I had to resort to tools. The logic of the code is also hard to make out because of the memory bookkeeping. * I was reading the open source code of a Linux program and had to dig deep into a couple of system topics and read the documentation for half a dozen syscalls to make sense of it. For me, C is one of the hardest languages to understand, you're always zoomed in at 10x, looking at all the insignificant details of memory management, working with strings and arrays, etc.
- gjulianm 7y ago> Any JavaScript or C# programmer will understand the ifs, elses and fors, I think that's what the parent comment meant with "reading (normal) C". The language itself is simple, because it only has the ifs, elses, and fors. Of course, given the simplicity of C the projects end up being complex because they have to manage a lot of things that other languages do for the programmer, but that is outside the scope of the language (i.e., you don't need to resort to the language manual to understand it). In other words, the discussion is not that everybody should be able to dive deep into C projects and instantly know what's happening, and know all syscalls and everything. The discussion is that a programmer should know what is memory management, what is a system call, etc, which is practically synonymous to being able to read normal C.
- oblio 7y agovoid strcat( char* dest, char* src ) { while (*dest) dest++; while (*dest++ = *src++); } This is pretty much C specific. And side-effect ridden, at that :-) I doubt the average Javascript programmer will figure that bit out, at a glance.
- kazinator 7y ago> If you can read those languages you can read C. If you can read those languages, you can probably tokenize C fairly well, and parse a decent proportion of it. But only understand maybe a small fraction.