Re:(Ab)Using Language Features: The Common Lisp Condition Sy...
by tolmasky on Friday May 16, 2014 @01:15PM
(#7756559)
This reminds me of using doesNotRecognizeToSelector:/methodForSelector: in Objective-C to do similar tricks. For example, you can wire up a color class to respond to any hexColor selector by catching the unimplemented ones:
You can then parse the selector string when the runtime doesn't find an appropriate method for it. As with all these tricks, it is of course incredibly slower than just doing GetHexColor(char * hexString), but where's the fun in that right.
[ Parent
| on HN ]
There are no comments on this comment yet.