Inheritance/Single: Difference between revisions
Content added Content deleted
(Added Wren) |
|||
Line 961: | Line 961: | ||
=={{header|Julia}}== |
=={{header|Julia}}== |
||
Julia is not really an object-oriented programming language. It |
Julia is not really an object-oriented programming language. It supports polymorphism and inheriting functionality but not structure. Thus inheritance hierarchies must be made with abstract types. Abstract types can not be instantiated and do not contain any fields. So below Dog is abstract while Collie is a concrete type which may contain fields. |
||
<lang julia> |
<lang julia> |
||
abstract type Animal end |
abstract type Animal end |