Arc Forumnew | comments | leaders | submitlogin
1 point by globalrev 6047 days ago | link | parent

everything in python is also an object just like in smalltalk right(or python has primitives?)?

what is the difference(well in this regard, obv they are different) then between smalltalk and python?



5 points by gnaritas 6041 days ago | link

Everything is python is not an object. Python uses procedural control structures like if/else/while/for implemented as special keywords. Smalltalk implements those control structures with objects, the Boolean subclasses True and False which have methods ifTrue:ifFalse: and the class BlockContext which implements methods such as whileTrue: and whileFalse:.

Having objects is entirely different from using objects as the basic building block of every abstraction in the language. Objects in Smalltalk are what S-expressions are to Lisp. Python and Ruby just have objects, but those languages aren't built from objects.

-----