Next: , Previous: , Up: Classes   [Contents]


2.4 Abstract Members

'abstract [keywords] name': params

Declare an abstract method name as having params parameters, having optional additional keywords keywords.

Abstract members permit declaring an API, deferring the implementation to a subtype. Abstract methods are declared as an array of string parameter names params.

    // declares abstract method 'connect' expecting the two parameters,
    // 'host' and 'path'
    { 'abstract connect': [ 'host', 'path' ] }

Abstract members may only be a part of one of the following: