Closed mhmdk closed 3 years ago
Seems right to me. A class defines methods, one of which can be an initializer. But the class does not have to define an initializer, in which case the constructor has an implicit arity of zero (as there's nothing to pass any arguments to).
It would be weird for an initializer to define a class inside of it.
yes, I misinterpreted the "we require" part. Thanks for clarification. I am closing the issue
Hello, in 12.6 constructors-and-initializers, under the implementation of LoxClass::arity(), there is a sentence that says: "We don’t require a class to define an initializer, though, as a convenience". I guess it should be ""We don’t require an initializer to define a class, though, as a convenience".
Thanks