學(xué)習(xí)語(yǔ)言的境界
心如止水
??? 我在努力學(xué)習(xí)C++,在我學(xué)了java和C#之后,典型的沒(méi)事找抽型。
??? C++使我很迷茫。這個(gè)語(yǔ)言太復(fù)雜了,他涵蓋的特性太多,領(lǐng)域太廣。用這門語(yǔ)言,你可以做出世界上最帥的事情,也可以做出世界上最衰的事情。由于C和C++要求彼此兼容,所以項(xiàng)目中總是混雜不同風(fēng)格的代碼,結(jié)構(gòu)化的,面向?qū)ο蟮?,偏底層的,偏?yīng)用的。一個(gè)字,亂!完全沒(méi)有在java平臺(tái)下的感覺(jué)。
??? 直到,我讀到了這么一段話:
?
No programming language is perfect. Fortunately, a programming language does not have to be perfect to be a good tool for building great systems. In fact, a general purpose programming language can not be perfect for all of the many tasks to which it is put. What is perfect for one task is often seriously flawed for another because perfection in one area implies specialization. Thus, C++ was designed to be a good tool for building a wide variety of systems and to allow a wide variety of ideas to be expressed directly.
?
Not everything can be expressed directly using the built-in features of a language. In fact, that isn’t even the ideal. Language features exist to support a variety of programming styles and techniques. Consequently, the task of learning a language should focus on mastering the native and natural styles for that language – not on the understanding of every little detail of all the language features.
?
In practical programming, there is little advantage in knowing the most obscure language features or for using the largest number of features. A single language feature in isolation is of little interest. Only in the context provided by techniques and by other features does the feature acquire meaning and interest. Thus, when reading the following chapters, please remember that the real purpose of examining the details of C++ is to be able to use them in concert to support good programming style in the context of sound designs.
?
這是《The C++ Programming Language Special 3rd Edition》的一段話。如果是新手,像我一樣對(duì)于C++眾多的語(yǔ)言特性無(wú)所適從,就要特別注意中間紅色的那段話。
??? 如果真正理解了這段話,那么我們會(huì)一起熱愛(ài)C++,甚至是java、C#。
posted on 2006-07-17 17:35
馬嘉楠 閱讀(146)
評(píng)論(0) 編輯 收藏 引用 所屬分類:
技術(shù)天地