We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use the class keyword preceding the method to indicate a static method that hangs off the class object.
class
class Math { class square(n) { return n * n; } } print Math.square(3); // Prints "9".
The “metaclasses” used by Smalltalk and Ruby are a particularly elegant approach. Hint: Make LoxClass extend LoxInstance and go from there.
The text was updated successfully, but these errors were encountered:
wiseodd
No branches or pull requests
Use the
class
keyword preceding the method to indicate a static method that hangs off the class object.The “metaclasses” used by Smalltalk and Ruby are a particularly elegant approach. Hint: Make LoxClass extend LoxInstance and go from there.
The text was updated successfully, but these errors were encountered: