Ashkan Kh. Nazary
Ashkan Kh. Nazary

Reputation: 22334

"Everything is an object", any name for this feature?

In some languages (specially dynamically typed ones), everything , even values, is an object. Like in Ruby you can say:

5.times { do something }

[ 5 is an object, not a primitive, so you can invoke a method (times) on it. ]

Does this language feature has a name on it?

Upvotes: 2

Views: 213

Answers (3)

sheldonh
sheldonh

Reputation: 2724

The Ruby Programming Language (co-authored by Matz) describes Ruby as having a "very pure object-oriented programming model".

Note that, in Ruby, not every construct of the syntax is an object. There are keywords and operators that are neither objects nor methods on objects. I suspect that this language feature has no glossy name because no language has the feature.

But if you narrow your definition of everything, to every value... Well that's different. :-)

Upvotes: 1

Dale
Dale

Reputation: 61

I know let coin the terms

  1. Object Based Language OBL (Ruby...)
  2. Object Oriented Language OOL (Java...)
  3. Object Extended Language OXL (C++, ObjectiveC...)

What do ya think? Add a language to each category.

Upvotes: 2

Aan
Aan

Reputation: 12900

I think this feature "Everything is an object" appears well in pure/true Object Oriented languages. Here is a question about JAVA whether it is a pure OO language or not. I can't find another specific name of "Everything is an object", so I would call it as such.

Upvotes: 3

Related Questions