“general type”常指“通用类型/一般类型”,表示不特指某一种具体类别的类型;在计算机与编程语境中,常用来指泛型/通用的类型参数(接近 generic type 的意思),用于让代码适用于多种数据类型。
/ˈdʒenərəl taɪp/
This is a general type of error that can happen on any device.
这是一种可能在任何设备上发生的通用错误类型。
In the API design, we use a general type so the same function can work with strings, numbers, or custom objects.
在这个 API 设计中,我们使用通用类型,让同一个函数能处理字符串、数字或自定义对象。
general 源自拉丁语 generalis(“普遍的、一般的”),与 genus(“种类、类别”)相关;type 源自希腊语 typos(“印记、模子、模型”),引申为“类型、类别”。合在一起,“general type”字面意思就是“普遍/通用的类别”。