next up previous
Next: 6 Compositionality Up: Differences between Sather-1.0 and Previous: 4 Encapsulation

5 Abstract classes

 

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:

  1. To implement S1 abstract classes in SK, just leave every method deferred.
  2. To implement S1 partial classes in SK, just leave every method deferred. SK tex2html_wrap_inline454 is equivalent to S1 tex2html_wrap_inline456 . SK abstract classes may not be instantiated.
  3. To implement SK abstract classes in S1, make an abstract class with the signatures and another class with the code.
  4. Where SK tex2html_wrap_inline458 is used, in S1 use tex2html_wrap_inline508 as well as tex2html_wrap_inline462 .
  5. Where S1 < is used, use in SK tex2html_wrap_inline458 .