| Polymorphism is a useful idea, but shouldn't be used merely to reduce the number of unique identifiers in the language spec. In service of the goal of causing the language to relax to some kind of natural state, there ought to be well-founded reasoning behind the use of polymorphism in each particular case. In #arc, we were discussing polymorphism in the function +. Currently, + can be used to either add numbers or concatenate lists. SEDfranke suggested that if we think of numbers as they were implemented in McCarthy's original Lisp - with n represented as a list of length n - then it makes some kind of sense that +, in addition to its basic functionality of concatenating lists, would also happen to add numbers. Thus our intuitive idea of the polymorphism of + is backed by logical reasoning. If we choose to embrace this philosophy, we should take it to its logical conclusions. For example, * should compute the outer product of lists: (* '(1 2) '(3 4))
((1 3) (1 4) (2 3) (2 4))
Multiplying a list of length A with a list of length B would result in a list of length (* A B), and so if numbers were truly implemented in McCarthy fashion, the operation would actually compute the product of numbers in addition to the outer product of lists.While we don't actually implement numbers in such an inefficient way, thinking about these issues as if we did turns out to be useful - a philosophy that pg espoused in one of his Arc essays. If we think of our language as a shadow of some Platonic ideal language, we've made our shadow just a little sharper. In Python, when a hack conforms to the ideas surrounding the language, an elegant and organized hack, it is called 'Pythonic'. I humbly suggest that a hack that fits Arc, a messy, dirty, but mathematically clever and well-founded hack, be called 'Archonic'. Is making * compute the outer product of lists an Archonic hack? How else can we draw on foundational thinking to make Arc more interesting? |