Comment #90

Description of a module

Added by Yuki Sonoda 279 days ago. Updated 279 days ago.

Status:Open Start:12/02/2009
Priority:Normal Due date:
Assigned to:- % Done:

0%

Category:-
Target version:-
Clause:

6.1

Page and Line:

22:36


Description

A module is an object which has the same structure as a class except that it cannot create an instance of itself and cannot be inherited.

Module cannot have a direct instance but can have an indirect instance through a class.
If the spec does not call such an instance as an instance of the module, definition of a class variable must change.

The spec should explicitly describe what a module can and not, rather than describing ambiguous similarity between a class and a module.

History

Updated by Shugo Maeda 279 days ago

Yuki Sonoda wrote:

[...]

Module cannot have a direct instance but can have an indirect instance through a class. If the spec does not call such an instance as an instance of the module, definition of a class variable must change.

It sounds strange for me.
Dou you call an instance of a class which includes the module Math "an instance of Math?"

The spec should explicitly describe what a module can and not, rather than describing ambiguous similarity between a class and a module.

Details are described in the subsequent clauses such as "13 Classes and modules", but we'd like to assist the understanding of the specification providing general description of important language constructs.

Also available in: Atom PDF