开发者

Interview question: difference between object and object-oriented languages [closed]

开发者 https://www.devze.com 2022-12-28 17:51 出处:网络
As it currently stands, this question is not a good fit for our Q&A format. We expect 开发者_JAVA技巧answers to be supported by facts, references,or expertise, but this question will likely so
As it currently stands, this question is not a good fit for our Q&A format. We expect 开发者_JAVA技巧answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 11 years ago.

My friend was asked the following question: what's the difference between object language and object-oriented language?

It's a little unintelligible question. What does term «object language» correspond to? Does that mean «pure» object-oriented language, like the Wikipedia article says:

Languages called "pure" OO languages, because everything in them is treated consistently as an object, from primitives such as characters and punctuation, all the way up to whole classes, prototypes, blocks, modules, etc. They were designed specifically to facilitate, even enforce, OO methods. Examples: Smalltalk, Eiffel, Ruby, JADE, VB.NET.


Unless the person was interviewed by a philosopher talking about an abstract metalanguage, or an old-school engineer talking about the end result a compiler produces, the question sounds like semantic masturbation by someone who doesn't speak the same language as the rest of the industry.

So in other words, the distinction is whatever the interviewer wants it to be. (Or perhaps the question was misheard). I don't think most developers would think that the terms are connected enough to be worthy of comparison and contrast.

The right response would probably be in the style of a psychoanalyst: What do you think it means? Ask clarifying questions to make sure you understand what the interviewer is asking and assuming. Then leave and don't call the employer back, because you don't want to work there.


  • The term object does not have an official, widely used or otherwise well-known definition.
  • The term object language does not have an official, widely used or otherwise well-known definition.
  • The term object-oriented does have an official definition, but that is usually completely ignored, not widely used nor otherwise well-known.
  • The term object-oriented language does not have a single official, widely used or otherwise well-known definition, it is usually understood to mean
    • a language in which object-oriented programming is possible or
    • a language in which only object-oriented programming is possible or
    • a language in which object-oriented programming is easy or
    • a language in which object-oriented programming is easy and non-object-oriented programming is hard or
    • a language in which everything is an object or
    • any combination of the above or
    • something completely different (and note that in any of the above you can substitute arbitrary definitions for "object" and "object-oriented")

In short: the interview question roughly translates to "what's the difference between this thing I'm not going to tell you what it is and that other thing I'm also not going to tell you what it is?"


I'd suspect that the interviewer was looking for a distinction between object-based and object oriented.

This is, for example, using structs in C, with no polymorphism or inheritance.

The difference between the two for C and C++ is highlighted here.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号