Autumn Russell
Autumn Russell
Ok, how about replacing all uses of an overloaded operator within the scope that the operator was overloaded. I don't know if this is possible without executing the code during...
Oh, and I don't think a binary function would do it, it would prevent specifying only certain objects to have redefined operators.
``` Array.prototype["@
`operate("infix")(arr, "
I wasn't thinking about custom operators, I don't see what advantage they have over functions, especially as function sin coco don't require parens. You could look into languages like haskell...
and you _are_ very right to worry about performance of this, I tested ``` # coffeescript because I already have custom textmate commands for it -_- for i in [0...10000000]...
I don't know haskell's syntax, so I can't really understand that document. An elegant way to set precedence would be: ``` expand after (array, value) -> ... ``` That might...
That looks great, though I assume that there would be some syntactic sugar for `$op`, and it wouldn't be a bad idea to use `if ... else if ... else`...
Ok, I'll see if I can understand the parsing going on.
The problem with the scala syntax is that `a b c` already compiles to `a(b(c))`. Also infix functions would need a different syntax than `` because `1 2` is ambiguous...