Next: 6 Compositionality
Up: Differences between Sather-1.0 and
Previous: 4 Encapsulation
Much has been made of the difference between S1 and SK abstract/partial
classes. They are very similar. The essential distinction is that in
S1, $ is part of the name and in SK it is an interface-extracting
operator. To translate code written using one into the other:
- To implement S1 abstract classes in SK, just leave every method
- To implement S1 partial classes in SK, just leave every method
deferred. SK is equivalent to S1
. SK abstract classes may not be instantiated.
- To implement SK abstract classes in S1, make an abstract class with
the signatures and another class with the code.
- Where SK is used, in S1 use as well as .
- Where S1 < is used, use in SK .