View Single Post
Posts: 303 | Thanked: 146 times | Joined on Aug 2009
#64
Originally Posted by fasza2 View Post
Let me explain why. All these interpreted languages(including C and C++) and tools(Qt, TK, GTK, modules etc.) came to life becuse of their 'lazyness'. You could also argue using interpreted languages vs. assemby. We all know the reasons there and I belive we have simillar reasons for this change as well.
They say that laziness is the mother of 9 out of 10 inventions. And it is true. This being said, laziness should not be used as an excuse to do crappy work.
I guess you mean that C is 'interpreted' in the sense that it is not machine code. Yes, C is less efficient than hand optimized ASM, however:
1. Over the years the compilers are doing a pretty good job in optimizing the binary code produced from C programs.
2. There are many CPU families out there (X86, ARM, RISC, etc.) and each family has different members with extended instruction sets, etc. So it would be a nightmare to port application from, say, X86 to ARM.

This is one of the reasons why C has been developed: to be almost as fast as assembly, but portable and relatively efficient in terms of coding time.