2 ms·
The constructor syntax can be a source of confusion. People have to be taught that the class declaration parameter list is actually the primary constructor, and
by yawaramin 9y ago
The constructor syntax can be a source of confusion. People have to be taught that the class declaration parameter list is actually the primary constructor, and that the body of the class is also the body of the primary constructor, except for any method definitions, some of which may be secondary constructors!
Scoping is hard.