Re: vote on prop keyword
Lenard Lindstrom <[email protected]>
| Newsgroups | gmane.comp.lang.prothon.user |
|---|---|
| Message-ID | <Mahogany-0.66.0-4294528931-20040710-135452.00@pop3.norton.antivirus> |
On Fri, 9 Jul 2004 11:51:26 -0700 Mark Hahn <[email protected]> wrote: > Currently I have implemented a "prop" keyword and it is even in the > tutorial. I thought we discussed this but apparently I imagined it because > I couldn't find it in the archives. The "prop" keyword is just syntax > sugar. This is how a property looks without the keyword: > > object Widget: > price = 3.72 > object tax(Property): > def get_(): > return self.price * 0.03 > > This is the same thing with the "prop" keyword as syntax sugar: > > object Widget: > price = 3.72 > prop tax: > def get_(): > return self.price * 0.03 > > Vote FOR the keeping the keyword or AGAINST the keyword and just typing out > the object statement. > > If you feel the keyword should be spelled differently then save that for a > different discussion and don't let that effect your vote. We can change the > keyword spelling. > I have no problems with the prop keyword. But if it is a shorthand then is it necessary for "def"s before get_, set_, and del_? object Widget: price = 3.72 prop tax: get_(): # There is no "def" here return self.price * 0.03 Lenard Lindstrom <[email protected]>