On Thu, 8 Jan 2004, Leopold Toetsch wrote: > Michal Wallace <[EMAIL PROTECTED]> wrote: > > > What exactly is the difference between an > > attribute and a property? > > $ perldoc docs/pdds/pdd15_objects.pod > /TRANSLATION AND GLOSSARY
Thanks. Don't mind me. I'm going to go make a card that says "RTFM" on my monitor here... :) So let me see if I have this right. Attributes are slots in a class, that get created on each instance. Properties don't have predefined slots, you can just attach whatever you want to any PMC. So: a language like java would probably use attributes, because the shape of the class is defined before hand, whereas python would tend to use properties... Right? But when I actually go to fill in the slots, I still use getprop/setprop for both types, right? So if I setprop on an attribute-based-class it would fill in the attribute first, and then if the attribute slot isn't there, do something else (like throw an exception or just make a property?) I guess what I'm asking is: is getprop/setprop a universal interface, or will we need some kind of logic to know whether a particular object uses attributes instead? Sincerely, Michal J Wallace Sabren Enterprises, Inc. ------------------------------------- contact: [EMAIL PROTECTED] hosting: http://www.cornerhost.com/ my site: http://www.withoutane.com/ --------------------------------------