RE: Re: Insight: Prothon isan Acquisition-orientedlanguage
"Mark Hahn" <[email protected]> Thu, 29 Jul 2004 10:45:15 -0700
| Newsgroups | gmane.comp.lang.prothon.user |
|---|---|
| Message-ID | <000301c47593$ce7c6e40$0b01a8c0@mark> |
Paul Prescod wrote: >>>Quite possibly. Any time you have a tree data structure with >>>inheritance, prototypes will make it easy to implement the >>>inheritance. You might also use it to implement style inheritance. >> >> >> What is style inheritance? > >http://www.w3.org/TR/REC-CSS1#inheritance > >One trick is that only some properties are inherited. It would >take some >thinking for me to decide that Prothon instance inheritance is much >better for this... One obvious advantage is that prototype data is inherited instead of just methods. As far as only some things not being inherited, the children object will just have to define their own attributes to override the parent's data to keep from inheriting it. This doesn't seem like a big deal to me. So I can imagine an html tree of inheritance that is made up of simple data attributes only that implements styles. There would be methods (or properties) defined only at the root for accessing the data. This seems like an advantage over a more complex scheme using classes and methods. Wouldn't you agree?