Inheritance/Single: Difference between revisions

Content added Content deleted
m (→‎{{header|Phix}}: added to Phix/Class)
m (Regularize non-standard header markup)
Line 437: Line 437:
ENDSTRUC Collie</lang>
ENDSTRUC Collie</lang>


== {{header|Common Lisp}} ==
=={{header|Common Lisp}}==


Using CLOS classes, we have the following:
Using CLOS classes, we have the following:
Line 474: Line 474:
These classes do not have to inherit from some interface or base class which provides a prototype for the serialize-to-asn-1 method. Such a requirement has more to do with static typing than object oriented programming. Usually in languages which require such inheritance, there are also statically typed references. A class must conform to some "ASNEncodable" class so that its instances can be passed to functions which expect references to an ASN1Encodable type, which is verified at compile time.
These classes do not have to inherit from some interface or base class which provides a prototype for the serialize-to-asn-1 method. Such a requirement has more to do with static typing than object oriented programming. Usually in languages which require such inheritance, there are also statically typed references. A class must conform to some "ASNEncodable" class so that its instances can be passed to functions which expect references to an ASN1Encodable type, which is verified at compile time.


== {{header|Component Pascal}} ==
=={{header|Component Pascal}}==


<lang oberon2>
<lang oberon2>