FEEDBACK WANTED: Type/class unification
Tom Jenkins
tjenkins at nospiced.ham.devis.com
Mon Jul 30 18:09:26 EDT 2001
Leo wrote:
> Not that my opinion matters much, but just in case someone else agrees
> with me, I will post it anyway.
>
> I like the direction that Python is taking. However I only have one
> request. Check out how Ruby handles accessor creation. I think it
> has a very simple and clean syntax with minimum of typing.
>
> I like the idea of get/set stuff, but it needs to become
> super-convinient to type in order for it to be used more widely. I
> would prefer for there being a fast way of telling Python that a
> certain class variable is get-enabled, set-enabled, or both without
> actually having to manually type out the accessor methods.
>
> Because plain accessor methods always do the same thing, it's a shame
> to waste any lines on them, imo. It's just a repetitive typing that
> brings no new information. Only when someone wants to override
> default accessors does it make sense to type it out, imo.
>
> Just my $.02. :) This is not meant to be a flame, just a request or a
> question, that's all.
>
if i remember correctly in the get/set stuff we have to supply a
statement like:
x = getset(self.getx, self.setx)
if i am remembering correctly then it should be rather easy for a tool
to write those def's for you... sort of like doing <Shift><Ctrl>C in
Delphi... it will stub out your getter/setters and add field
declarations for your properties.
now-what-do-we-have-if-i-add-my-.02-to-your-.02-ly yr's
Tom
More information about the Python-list
mailing list