PyWart (Terminolgy): "Class"

Rick Johnson rantingrickjohnson at gmail.com
Mon Jan 14 02:32:55 EST 2013


On Monday 1-14-2013 at 12:46 AM, Rick Johnson wrote:
> [...]
> "object":
> 
> This is my favorite word however it does suffer a
> "verbial" disconnection. What are we suggesting? A single
> word can be very ambiguous as to intent. However, if we
> couple the word "object" with the word "define" we then
> inject intent. "define object" on it's face is perfect! 

I just had an epiphany of sorts. 

I really don't like using two words ("define object", or "def obj") and using one single keyword is ambiguous ("object" or "obj"). So the obvious solution is to combine the abbreviated words into one compound keyword that will save keystrokes, save parsing, and all-the-while maintain symmetry. That keyword is "defobj". Coupled with "defmeth" and "deffunc" we now have a symmetrical definition syntax!

deffunc bar():
   return

defobj Foo():
    defmeth __init__(self, blah):
        pass

Extra Credit: Can anyone think of a better solution for defining objects without using keywords at all? Hmm... I'm getting a chubby just thinking about it!



More information about the Python-list mailing list