Nested/Inner Classes ==================== This is very useful for: * small record types for example in: - multiple return values - extensible alternative to function parameters/return values - in data structures, e.g. lists, maps. - to avoid repetition. * builder classes * wrappers Should it be allowed for all, or only for e.g. records? - functions inside them will only be allowed to access data that belongs to the nested class. Should it be possible to expose/export inner classes? - within the module? - outside of the module? Syntax ------ Should it implicitly be a `data` block? What keyword(s) to use? - `local class` - `inner class` - `nested class` - `nested` Example: nested Point int x int y end data Point p1 Point p2 end Or # or #nested data Point #inner data Point nested class Point int x int y end Or (best?) nested Point data int x int y end end data Point p1 Point p2 end Or # In order to give good error messages when `class N` is placed the # beginning of N.slul, let's use some distinctive keyword sequence # instead of just `class`: local class Point data int x int y end end data Point p1 Point p2 end