术语:类之于对象,正如组件之于_?
多年来我多次思考过这个问题,特别是当它与UML 相关时。它在最近的讨论中再次出现(时间: 20:38.19 在链接页面上)。
我们有良好、可靠的术语来区分类的实例和类本身。当我说“对象”时,每个人都知道我指的是在内存中分配并处于某种状态的某个特定实例。当我说“类”时,每个人都知道我正在谈论驻留在源文件中某处的某些类定义。
但有时根据组件实例来讨论系统是有用的。但除了“组件实例”之外,没有一个好的、通用的词来表达这个想法。
有什么我不熟悉的好术语吗?
This is something that I've thought about several times over the years, especially as it relates to the UML. It came up again in a recent discussion (at time:20:38.19 on the linked page).
We have good, solid terminology distinguishing between instances of classes and the classes themselves. When I say "object", everyone knows that I'm referring to some particular instance that is allocated in memory and is in some state. When I say "class", everyone knows that I'm talking about some class definition residing in a source file somewhere.
But sometimes it's useful to discuss a system in terms of instances of components. But there's not a good, general purpose word for expressing that idea, other than "component instance".
Is there a good term that I'm unfamiliar with?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我的理解是,正常意义上的UML“组件实例”通常简称为“组件”或“子组件”或“部分”。 UML 的“组件”基本上是一个“组件类”或更常见的“子系统”,即更大的组件。
The way I understand it is that UML's "component instance" in normal sense is usually just called "component" or "subcomponent" or "part". And UML's "component" is basically a "component class" or more often "subsystem" i.e. bigger component.