术语“对象”和“对象”之间有什么区别?和“实例”;用编程语言?
我无法区分这两个术语。 你呢?
I cannot distinguish the two terms.
How about you?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
我无法区分这两个术语。 你呢?
I cannot distinguish the two terms.
How about you?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(3)
每个对象都是类型的实例。在描述成员范围时,使用实例一词代替对象(即静态与实例)。当引用引用的目标(例如,变量或字段)时,通常使用单词对象来代替实例。
Every object is an instance of a type. The word instance is used instead of object when describing member scope (i.e., static vs. instance). The word object is usually used instead of instance when referring to the target of a reference (e.g., a variable or field).
对于许多(可能是大多数)目的来说,没有真正的区别。您可以进入一些边缘区域,例如 C,它基本上将任何具有地址的东西(函数除外)定义为“对象”——但是当然,C 中没有任何东西像该术语那样是“实例”通常使用(即类的实例)。话又说回来,这完全是一个定义的问题——只要你和与你交谈的人都同意这些词的含义,那么你称某个东西为“实例”还是“对象”并不重要。或“blafle”。
For many (probably most) purposes, there's no real difference. You can get into some fringe areas, such as C, which defines essentially anything (but a function) that has an address as being an "object" -- but of course, nothing in C is an "instance" the way that term is typically used (i.e., an instance of a class). Then again, it's all a matter of definitions -- as long as you and whomever you're talking with agree on what the words mean, it doesn't matter a whole lot whether you call something an "instance" or an "object" or a "blarfle".
对象是一个更通用的术语。任何东西都是对象,它可能不是特定类型的实例。对于最常见的目的,这些术语可以互换,特别是在程序的上下文中。
Object is a more general term. Anything is an object, it may not an instance of particular type. For most common purposes, those terms can be interchanged especially in the context of a program.