From: PCMan <pcm...@gm...> - 2013-04-25 15:49:49
|
Please focus on constructive and technical discussions and avoid flame wars. We're here to build better software, not to argue what programming language or toolkit is better. There is no silver bullet. It's all about "balance". The fastest program,, of course, is written in assembly. Compared with it, all C programs are bloatware. Do you use assembly for GUI development? Read the source code of gtk+ and glib and you'll know why it's not as lightweight as you think. See this: https://git.gnome.org/browse/glib/tree/gobject All of the source code here are used to emulate OOP. Most of the things the gobject library does "at runtime" are done by C++ compilers at compile time without any cost at runtime. For every GObject class, you need to write hundreds of lines of duplicated boilerplate code just to emulate what C++ compuiler does. That's the real hidden cost. I'm afraid that these unnecessary lines of code are even more than the ones C++ template generates. Besides, today's C++ compiler are very smart and will optimize out unnecessary code. So bloat of "source code" or the intermediate object files is no issue. Programming languages and toolkits are just tools. Whether the result is good or not depends on how you use it and that's the value of programmers. It's who uses the tools that matters, not the tools themselves. I'll stop responding to the thread here. |