Abstract type: Difference between revisions
Content deleted Content added
Line 1,422: | Line 1,422: | ||
Unlike interfaces, properties can include method implementations and attributes (see lang/Comparable.of for instance). |
Unlike interfaces, properties can include method implementations and attributes (see lang/Comparable.of for instance). |
||
To be of a particular property, a list of methods can tagged as required. For instance, in order to be Comparable, a class should implement <= |
|||
<lang Oforth>Property new: Spherical(r) |
<lang Oforth>Property new: Spherical(r) |
||
Line 1,443: | Line 1,441: | ||
{ |
{ |
||
| b p | |
| b p | |
||
Ballon new($red, 0.1) ->b |
Ballon new($red, 0.1) ->b |
||
System.Out "Ballon radius is : " << b radius << cr |
System.Out "Ballon radius is : " << b radius << cr |