Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

learning objective-c is better for understanding computer architecture

than higher level languages such as Java C#... is this argument valid? I'm new to iPhone development and some people have told me this.

like image 617
Yaso Avatar asked Dec 16 '22 23:12

Yaso


1 Answers

You're asking whether you get a better idea of car mechanics if you drive a manual transmission rather than a automatic - you'll kind of get a bit more of a feel what the engine is doing, and you'll get a horrible grinding mess if you do it wrong, but you won't get any deep understanding of what is 'under the hood' from either.

The semantics of the C language, of which objective-C is a superset, echoes the architecture of the machine it was created for - the PDP-11.

If you look at modern computer architectures - shared instruction and data memory, virtual memory, L1 and L2 cache, bus speed limits, 'north' and 'south' bridges, multi-core or many-core CPU, solid state disk, graphics processor, FPGA accelerators - then there isn't one language which has semantics which echo all of the variants, nor does the C language have anything to do with them. The best place to learn about computer architecture is a computer architecture text book or lecture, or read about how modern architecture effects programs in all languages.

C will give you a portable assembler, so represents a couple of steps away from the architecture - it assumes you have pointers (which may be implemented as addresses) to areas you can store data, and it has keywords which imply that data may change (volatile) and that the CPU has registers rather than being stack based. But it won't really tell you that much about the architecture of your machine, it will only tell you about the C memory model, which is an abstraction of the machines of 40 years ago.

like image 130
Pete Kirkham Avatar answered Dec 19 '22 14:12

Pete Kirkham