<p>(Though I do not major in computer science/software engineering or work in such fields, I am personally interested in programming and sometimes read technical discussions on websites including 知乎. The following are based on what I read)</p>
<p>As far as I know, 类 and 类型 are used differently.</p>
<p>Indeed 类 and
类型 might be interchangeable in many languages where user-defined types can only be classes, but in languages like C#, they need to be differentiated.</p>
<p>Apart from this point, there are still some preferences.</p>
<p>(The &quot;bad examples&quot; in the following part are not necessarily wrong, but they seem to appear less often)</p>
<p>类 is used in contexts emphasizing the OOP features, etc:</p>
<blockquote>
<p>这个对象是某某类的实例</p>
<p>*这个对象是某某类型的实例</p>
</blockquote>
<p>类型 is seemingly prefered in a question about the type, even if something is already known as an object:</p>
<blockquote>
<p>这个对象的类型是什么？</p>
<p>*这个对象的类是什么？</p>
</blockquote>

CC BY-SA 4.0
2023-07-12T13:42:07.227Z
I just realized they're different in usage. e.g. integer type: 整型, abstract class: 抽象类。
DannyNiu
CC BY-SA 4.0
2023-07-12T12:59:51.133Z
2023-07-12T16:23:54.290Z
2023-07-12T16:23:54.290Z
Xin Shiyu
<p>Class is concept about OOP</p>
<ul>
<li>class 类</li>
<li>abstract class 抽象类</li>
<li>superclass 父类</li>
<li>subclass 子类</li>
</ul>
<p>Typing is used for typing system</p>
<ul>
<li>type 类型</li>
<li>static / dynamic typing 静态/动态类型</li>
<li>strong / weak typing 强/弱类型</li>
<li>type inference 类型推导</li>
<li>duck typing 鸭子类型</li>
<li>built-in type 内置类型</li>
<li>boxed / unboxed type 装箱/拆箱类型</li>
</ul>
<p>In CSS, it could be tricky, but translation consistent</p>
<ul>
<li>class selector 类选择器 (selector match <code>class</code> attribute of some element, <code>.active</code>, <code>.clearfix</code> for example)</li>
<li>type selector 类型选择器 (selector match node name of some element, <code>a</code>, <code>span</code> for example)</li>
</ul>

CC BY-SA 4.0
2023-07-12T15:16:15.937Z
2023-07-19T02:42:02.443Z
2023-07-19T02:42:02.443Z
tsh
<p>类 - class, kind, category - A collection of things sharing a common attribute</p>
<ul>
<li>人(类)</li>
</ul>
<p>类型 - type, pattern - A particular kind of thing with a customary way of operation or behavior</p>
<ul>
<li>愛生氣的人/类型</li>
</ul>

CC BY-SA 4.0
2023-07-13T01:45:24.697Z
I believe OP is talking about "class and type" in the context of computer programming, and not as in everyday common usage?
Wayne Cheah
CC BY-SA 4.0
2023-07-13T02:30:39.990Z
@WayneCheah After further reading into it, I think you are right that he is looking for examples in the field of computer programming, 我是隔靴搔癢:)
r13
CC BY-SA 4.0
2023-07-13T04:30:39.623Z
尚未达到天壤之别 : ) : )
Wayne Cheah
CC BY-SA 4.0
2023-07-12T14:21:49.247Z
2023-07-12T14:21:49.247Z
r13
<blockquote>
<p>Are class and type distinguished in Chinese</p>
</blockquote>
<ul>
<li>class is 級別 (among aircraft carriers, there are different classes)</li>
</ul>
<p>Example: <a href="https://en.wikipedia.org/wiki/List_of_naval_ship_classes_in_service" rel="nofollow noreferrer">https://en.wikipedia.org/wiki/List_of_naval_ship_classes_in_service</a></p>
<ul>
<li>type is 類別 (Aircraft carrier and submarine are two different types of ship)</li>
</ul>
<p>Example: <a href="https://en.wikipedia.org/wiki/List_of_types_of_naval_vessels" rel="nofollow noreferrer">https://en.wikipedia.org/wiki/List_of_types_of_naval_vessels</a></p>
<p>Also:</p>
<p>藍鯨是一級受保護動物，虎鯨是二級受保護動物 The blue whale is a first-class protected animal, and the killer whale is a second-class protected animal. (different classes)</p>
<p>馬是素食類動物，貓是肉食類動物，人是雜食類動物 Horses are vegetarians, cats are carnivores, and humans are omnivores (different types)</p>

CC BY-SA 4.0
2023-07-12T13:43:40.980Z
Sorry, this question is somewhat technical in nature, and you haven't seem to grasp its essence when answering.
DannyNiu
CC BY-SA 4.0
2023-07-12T12:46:25.437Z
2023-07-12T12:59:30.223Z
2023-07-12T12:59:30.223Z
Tang Ho
<p>For most of my professional career, I've never encountered anyone distinguish 类 or 类型 or class or type in spoken or written language, and the two concepts seem to be synonymous in programming.</p>
<p>But when I read HandWiki on this topic, it seems that type dictates the values of data<sup><a href="https://handwiki.org/wiki/Data%20type" rel="nofollow noreferrer">1</a></sup>, where as objects are implemented in classes<sup><a href="https://handwiki.org/wiki/Class%20(computer%20programming)" rel="nofollow noreferrer">2</a></sup>.</p>
<p>Does any technical document &quot;in-the-wild&quot; (other than those specifically devoted to explaining their difference for educational purposes) distinguish between class and type?</p>

<terminology><technology>
Are class and type distinguished in Chinese?
# Are class and type distinguished in Chinese?

(Asked by: username_0 on 2023-07-12)

For most of my professional career, I've never encountered anyone distinguish 类 or 类型 or class or type in spoken or written language, and the two concepts seem to be synonymous in programming.

But when I read HandWiki on this topic, it seems that type dictates the values of data[1](https://handwiki.org/wiki/Data%20type), where as objects are implemented in classes[2](https://handwiki.org/wiki/Class%20(computer%20programming)).

Does any technical document "in-the-wild" (other than those specifically devoted to explaining their difference for educational purposes) distinguish between class and type?

**Tags:** terminology, technology


---

## 4 answers

### Answer by username_1 on 2023-07-12. Score: 2 | Accepted answer

(Though I do not major in computer science/software engineering or work in such fields, I am personally interested in programming and sometimes read technical discussions on websites including 知乎. The following are based on what I read)

As far as I know, 类 and 类型 are used differently.

Indeed 类 and
类型 might be interchangeable in many languages where user-defined types can only be classes, but in languages like C#, they need to be differentiated.

Apart from this point, there are still some preferences.

(The "bad examples" in the following part are not necessarily wrong, but they seem to appear less often)

类 is used in contexts emphasizing the OOP features, etc:

> 这个对象是某某类的实例
>
> \*这个对象是某某类型的实例

类型 is seemingly prefered in a question about the type, even if something is already known as an object:

> 这个对象的类型是什么？
>
> \*这个对象的类是什么？

> **Comments:**
> **username_0**: I just realized they're different in usage. e.g. integer type: 整型, abstract class: 抽象类。  

---

### Answer by username_2 on 2023-07-12. Score: 3

Class is concept about OOP

* class 类
* abstract class 抽象类
* superclass 父类
* subclass 子类

Typing is used for typing system

* type 类型
* static / dynamic typing 静态/动态类型
* strong / weak typing 强/弱类型
* type inference 类型推导
* duck typing 鸭子类型
* built-in type 内置类型
* boxed / unboxed type 装箱/拆箱类型

In CSS, it could be tricky, but translation consistent

* class selector 类选择器 (selector match `class` attribute of some element, `.active`, `.clearfix` for example)
* type selector 类型选择器 (selector match node name of some element, `a`, `span` for example)


---

### Answer by username_3 on 2023-07-12. Score: 0

类 - class, kind, category - A collection of things sharing a common attribute

* 人(类)

类型 - type, pattern - A particular kind of thing with a customary way of operation or behavior

* 愛生氣的人/类型

> **Comments:**
> **username_4**: I believe OP is talking about "class and type" in the context of computer programming, and not as in everyday common usage?  
> **username_3**: @username_4 After further reading into it, I think you are right that he is looking for examples in the field of computer programming, 我是隔靴搔癢:)  
> **username_4**: 尚未达到天壤之别 : ) : )  

---

### Answer by username_5 on 2023-07-12. Score: 0

> Are class and type distinguished in Chinese

* class is 級別 (among aircraft carriers, there are different classes)

Example: <https://en.wikipedia.org/wiki/List_of_naval_ship_classes_in_service>

* type is 類別 (Aircraft carrier and submarine are two different types of ship)

Example: <https://en.wikipedia.org/wiki/List_of_types_of_naval_vessels>

Also:

藍鯨是一級受保護動物，虎鯨是二級受保護動物 The blue whale is a first-class protected animal, and the killer whale is a second-class protected animal. (different classes)

馬是素食類動物，貓是肉食類動物，人是雜食類動物 Horses are vegetarians, cats are carnivores, and humans are omnivores (different types)

> **Comments:**
> **username_0**: Sorry, this question is somewhat technical in nature, and you haven't seem to grasp its essence when answering.  

---

