Arc Forumnew | comments | leaders | submitlogin
2 points by rntz 5757 days ago | link | parent

This is vaguely similar to 'defmulti in "lib/multi.arc" on Anarki (http://arclanguage.org/item?id=8330), except this allows one to override existing functions, and explicitly has in-order overriding semantics rather than look-up semantics. Similar code, different use-cases. The label argument makes it a nice improvement over anarki's 'redef, though. Personally, I think the ultimate solution to this problem is to unify pattern-matching and inheritance (http://www.rntz.net/post/oo-and-pattern-matching.html), but this is a pretty neat hack.