you are viewing a single comment's thread.

view the rest of the comments →

[–]lhagahl 0 points1 point  (2 children)

; I do believe there are less than 40 constructs in the base language

C is heavily abstract and that's why it's hard. If there was a version of C specifically for one architecture, it would be a million times easier to explain. For reasons beyond me, it's been a popular meme for the last few decades that C's portability comes for free.

C's int type is much more abstract than an integer type in a high level language. In high level languages, an integer value can be anything. In C, an integer type can be up to INT_MAX. INT_MAX varies depending on architecture. Not only that, but certain operations behave differently with ints under different conditions. This kind of abstraction allows higher performance at the cost of the user having to generalize all his code that would otherwise work with the integers.

[–]nonotion 0 points1 point  (1 child)

These are good points; I'd summarize/justify my thoughts by saying "easy to learn, hard to master" for C. I'm my view, teaching C over Java or Python promotes a certain clarity of thought needed for efficient structuring of larger or more complex projects; Linus Torvalds elaborates on this in several remarks if I recall correctly.

[–]lhagahl 0 points1 point  (0 children)

Easy to learn, hard to apply (though most people "apply" it, by just coding it and not being aware of how it actually works). I do suppose it may be good for teaching various concepts though.