Tristan Zajonc (2013-10-29T23:51:41.000Z)
domenic at domenicdenicola.com (2013-11-03T22:13:05.619Z)
On Tue, Oct 29, 2013 at 3:03 PM, Brendan Eich <brendan at mozilla.com> wrote: > The operators stuff I've been developing uses a variant of multimethod > dispatch. > > Operators cannot be usable if spelled #add, so we must support all the > built-in ones I've talked about (see http://www.slideshare.net/BrendanEich/js-resp). > Whether we need element-wise operators is really what this thread is about > (I think, based on Tristan's spinout). Arbitrary infix named operators IMHO > want another thread, and also later. Design means leaving things out (N. > Wirth). Both operators and element-wise operators really benefit from Brendan's multiple dispatch proposal. Julia has used this approach to great effect. I'm not opposed to it, but I don't believe there's a compelling need for arbitrary infix operators in the technical computing domain. The motivation for elementwise operators is to allow for a clean matrix API that would make JS best-of-bread for numerical computing. A secondary benefit is that it could provide a cow path towards high performance BLAS backed matrix operations making it to the browser sometime far in the future. Any suitably lightweight syntax would work, although +: has some things to recommend it.