-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Closed
Labels
DuplicateAn existing issue was already createdAn existing issue was already created
Description
Since functions can be defined in and returned from function bodies, it seems inconsistent to not support the definition of classes in functions. It would be very useful in applications where explicit typing of ad-hoc return value is preferred over duck typing.
The syntax and semantics could be the same as defining a class in a module (since a module is compiled to a function) with different lexical scope. Java-specific features like anonymous inner class is probably not useful due to duck typing.
Metadata
Metadata
Assignees
Labels
DuplicateAn existing issue was already createdAn existing issue was already created