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