KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
In Ruby, super is a keyword rather than a method. Why was it designed this way? Ruby's design tends toward implementing as much as possible as methods; keywords are usually reserved for language features that have their own grammar rules. super , however, looks and acts like a method call. (I know it would be cumbersome to implement super in pure Ruby, since it would have to parse the method name out of caller , or use a trace_func . This alone wouldn't prevent it from being a method, because plenty of Kernel 's methods are not implemented in pure Ruby.)
Tags (comma-separated)
Save Edits
Cancel