4 ms·
`UndefinedMethodError` perhaps? that way we can restore the distinction between method declaration (which assigns a name, within some namespace) and method defi
by yawboakye 3y ago
`UndefinedMethodError` perhaps? that way we can restore the distinction between method declaration (which assigns a name, within some namespace) and method definition/implementation which gives the function its ability.
- nithinbekal 3y agoWouldn't that be too similar to NoMethodError? I recently came across the idiom in Smalltalk, where you would call subclassResponsibility: someMethod: self subclassResponsibility I've suggested the name in the ruby bug tracker issue here: https://bugs.ruby-lang.org/issues/18915 https://bugs.ruby-lang.org/issues/18915
- yawboakye 3y agolinguistically speaking, no method means the name isn’t even known, which isn’t the case here. the name exists and is known (after a successful declaration). what’s missing is the actual definition. if we lean heavily into language, perhaps only undefined method will do.