Re: vote on prop keyword

Paul Prescod <[email protected]>
Newsgroups gmane.comp.lang.prothon.user
Message-ID <[email protected]>
Mark Hahn wrote:
> Paul Prescod wrote:
> 
> 
>>Can I vote AGAINST the object syntax? ;)
> 
> 
> Don't leave me hanging. :-)  What do you mean by this?  Do you dislike the
> whole idea of having a Property (Prop) prototype special to the interpreter?
> If so, why?

Sorry: I've just been busy for the lasts couple of days, and I can't 
come up with a crisp description of what I dislike about "prop" or would 
rather see.

To me, a property is a kind of slot on an object, not a kind of object. 
Or to put it another way: a kind of relationship between objects, not a 
kind of object.

Now in languages which are strongly object oriented, I guess you do 
represent relationships as objects as well. In Python "property" is an 
object. But you don't inherit from it: you use it to wrap your object.

Anyhow, I think that a) the "prop" keyword is a good way of hiding the 
underlying machinary and b) the underlying machinary is probably fine 
but it just took me by surprise at first because it uses inheritance 
instead of either "special" slots (which I would expect from a language 
like Java) or wrapper objects (which I expect from Python).

  Paul Prescod
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.