[pyar] [video] En Python tenemos nombres, no variables.

Roberto Alsina ralsina en netmanagers.com.ar
Jue Jun 5 10:21:54 ART 2014


On 05/06/14 10:12, Alejandro Santos wrote:
> 2014-06-05 15:01 GMT+02:00 Roberto Alsina <ralsina en netmanagers.com.ar>:
>> On 05/06/14 09:06, Alejandro Santos wrote:
>>> 2014-06-04 21:52 GMT+02:00 Roberto Alsina <ralsina en netmanagers.com.ar>:
>>>> Python 3 si. Bueno, mas o menos. Depende de como definís objeto :-)
>>>>
>>> Tal cual, decir que "todo" es un objeto significa que un Int es un
>>> array de Booleans, donde cada bit es un objeto.
>>>
>>> Mi opinión personal es que siempre me pareció innecesaria esa
>>> motivación que algunas personas tienen del "purismo de objetos", o en
>>> general "purismo de X" donde X es algún concepto abstracto. Whatever.
>>>
>>> Por ejemplo la "teoría de objetos" dice que "todo es un objeto y todo
>>> objeto tiene una clase",
>>
>> Ehhhh no? :-)
>> Hay sistemas de objetos sin clases, como los sistemas basados en prototipos,
>> no?
>>
> Pero eso no es un sistema de objetos puro! Me estás cambiando de
> paradigma, Roberto :P
>

Ningún lenguaje excepto (tal vez) Smalltalk es orientado a objetos segun 
la definicion original de Kay, que encima no la escribió nunca en ningún 
lado, por lo cual hay dos versiones:

1. EverythingIsAnObject.
2. Objects communicate by sending and receiving messages (in terms of 
objects).
3. Objects have their own memory (in terms of objects).
4. Every object is an instance of a class (which must be an object).
5. The class holds the shared behavior for its instances (in the form of 
objects in a program list)
6. To eval a program list, control is passed to the first object and the 
remainder is treated as its message.

o

1. EverythingIsAnObject.
2. Communication is performed by objects communicating with each other, 
requesting that objects perform actions. Objects communicate by sending 
and receiving messages. A message is a request for action, bundled with 
whatever objects may be necessary to complete the task.
3. Objects have their own memory, which consists of other objects.
4. Every object is an instance of a class. A class simply represents a 
grouping of similar objects, such as integers or lists.
5. The class is the repository for behavior associated with an object. 
That is, all objects that are instances of the same class can perform 
the same actions.
6. Classes are organized into a singly-rooted tree structure, called the 
inheritance hierarchy. Memory and behavior associated with instances of 
a class are available to any class associated with a descendent in this 
tree structure.


Y encima cuando le preguntaron en persona en 2003 simplemente dijo

" OOP to me means only messaging, local retention and protection and 
hiding of state-process, and extreme late binding of all things."

Asi que de acuerdo a Kay en 2003, se puede ser OOP sin clases, pero de 
acuerdo a Kay en 1974 no ;-)
------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: <http://listas.python.org.ar/pipermail/pyar/attachments/20140605/b900e0d2/attachment.html>


More information about the pyar mailing list