Inheritance/Single: Difference between revisions

m
m (→‎{{header|Phix}}: use pygments)
Line 2,090:
=={{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.
<syntaxhighlight lang="self">animal = ()</syntaxhighlight>
animal = ()
<syntaxhighlight lang="self">dog = (| parent* = animal |)</syntaxhighlight>
<syntaxhighlight lang="self">catdog = (| parent* = animal |)</syntaxhighlight>
<syntaxhighlight lang="self">labcat = (| parent* = doganimal |)</syntaxhighlight>
<syntaxhighlight lang="self">collielab = (| parent* = dog |)</syntaxhighlight>
collie = (| parent* = dog |)
</syntaxhighlight>
 
=={{header|Sidef}}==
7,806

edits