+ Java doesn't promise "everything is an object." It has Base Types.
+ Python doesn't make a semantic promise that "everything is an object." Code for
(3).fizzbuzz => "fizz"
probably needs written in C because built-in types are closed and object literals use the built-in types. "3" cannot be forced to use a subclass of Integer.At the bottom, '3' is defined in terms of Types (i.e. "Built-in Types") not as an Object.
+ Ruby's semantic promise that "everything is an object" means:
class Fixnum
def fizzbuzz()
if self % 15 == 0
"fizzbuzz"
end
if self % 3 == 0
"fizz"
end
if self % 5 == 0
"buzz"
end
return self
end
end
And "3" behaves just like any other object. The "everything is an object" promise means that behavior as an object is a cross-cutting concern (or an aspect).