PreviousUpNext

10.11.6  Subapis

Packages may also declare nested APIs: be useful for a variety of reasons, including namespace cleanliness and control of complexity:

    package alpha {

        api Beta {

            bar: String;
        };

        package beta: Beta {

            bar = "abc";
        };
    };

Here API Beta is externally accessible as alpha::Beta, package beta is externally accessible as alpha::beta, and bar is externally accessible as alpha::beta::bar.


Comments and suggestions to: bugs@mythryl.org

PreviousUpNext