面向?qū)ο蟮木幊陶Z言里,有個“類”的概念,當時看到它的第一眼我就懵逼了,好長時間也不理解這個“類”是什么意思,直到我看到英文單詞 Class 我才恍然大悟,原來“類”就是類別的意思,在面向?qū)ο螅∣bject)的編程語言中,先定義一個Class,Class里面定義了這一類別的通用的特性屬性和功能方法,然后再實例化這個“類”,所謂的實例化也就是具體化,然后這個寬泛的類就變成了具體的對象,這個編程思路復合老外的思維,老外喜歡先定框架,然后再細化,這就是面向?qū)ο蟮木幊陶Z言的本質(zhì)。
“類”的英文是Class,英文單詞明明淺顯易懂,但翻譯成中文之后卻變得晦澀難懂,因此,學習國外先進科技最好直接看英文原版。
1 英語原意
類:Class
2 英文解釋
class noun (TEACHING GROUP)
a group of students who are taught together at school, college, or university.班;班級
class noun (ECONOMIC GROUP)
a group of people within society who have the same economic and social position. 社會等級;階級;階層
class noun (RANK)
a group into which goods, services, or people are put according to their standard.(貨物、服務或人的)等級,類別,級別
class noun (STYLE)
the quality of being stylish or fashionable. 風度;時髦;優(yōu)雅
class noun (BIOLOGY)
a group of related plants or animals, in the general classification of plants and animals. (植物或動物分類的)綱
class verb
to consider someone or something to belong to a particular group because of their qualities. 把…歸類;把…分級
class adjective
very good 極好的;優(yōu)秀的;出色的
3 中文解釋
類的中文含義:
- 很多相似事物的綜合:種~。~群。~別。~書。分~。人~。
- 相似,好像:~似。~同。
在計算機專業(yè),類,英文單詞 Class,用來描述具有相同的屬性和方法的對象的集合。它定義了該集合中每個對象所共有的屬性和方法。對象是類的實例。
Class在英文世界里非常容易理解,但翻譯成中文“類”之后就變得晦澀難懂,中文的“類”把“Class”簡化得太厲害了,應該翻譯成“類別”比較準確。好多課程之所以學不好,不是因為我們笨,而是因為翻譯的問題。
特別聲明:以上內(nèi)容(如有圖片或視頻亦包括在內(nèi))為自媒體平臺“網(wǎng)易號”用戶上傳并發(fā)布,本平臺僅提供信息存儲服務。
Notice: The content above (including the pictures and videos if any) is uploaded and posted by a user of NetEase Hao, which is a social media platform and only provides information storage services.