From: gabriele renzi Date: 2004-07-03T03:17:47+09:00 Subject: Re: Why I don't use Ruby. il Sat, 3 Jul 2004 02:56:21 +0900, Ben Giddings ha scritto:: >Whoa, depends on how you define 'pure-oo'. Maybe they are OO under the >covers, but the interface (which has remained backwards-compatible) sure >isn't very OO. I define it as: everything is an object >Take for example, 'len', it's not a property of Strings or Arrays, it's >a function you apply to them to get their length. Same goes for 'map', >it's not a property of lists or arrays, it's just a function. actually, len is just a commodity, the length of an array is actually: >>> ary=[1,2,3,4] >>> ary.__len__() 4 >Maybe behind the scenes Integers are now objects, but that sure doesn't >make the language seem very 'pure-oo'. not behind the scenes: >>> class MyInt(int): pass I'm not really a python guru, but for the definition of 'pure oo' as 'everything that gets assigned to a variable name is an object', it is. If your definition is based on type(x) being less pure then x.class.. well, then it's not OO. (obviously x.__class__() works fine in python ;)