Inheritance/Single: Difference between revisions
Content deleted Content added
Added Self version |
|||
Line 1,568: | Line 1,568: | ||
# ... |
# ... |
||
end struct;</lang> |
end struct;</lang> |
||
=={{header|Self}}== |
|||
Self is a class-free, object-oriented language, and as such, it uses prototypal inheritance instead of classical inheritance. This is an example of the relevant excerpts from a Self transporter fileout. Normally the object tree would be built and navigated within the graphical Self environment. |
|||
<lang self>animal = ()</lang> |
|||
<lang self>dog = (| parent* = animal |)</lang> |
|||
<lang self>cat = (| parent* = animal |)</lang> |
|||
<lang self>lab = (| parent* = dog |)</lang> |
|||
<lang self>collie = (| parent* = dog |)</lang> |
|||
=={{header|Sidef}}== |
=={{header|Sidef}}== |