squiggle icon indicating copy to clipboard operation
squiggle copied to clipboard

Math infixes shouldn't use regular function names

Open OAGr opened this issue 1 year ago • 2 comments

This shouldn't break things:

multiply(a,b,c) = a

3 * 5

We could instead map the infixes to alternate versions of these names, like, operationMultiply, or something less used. We might well want to make these special key words that can't be shadowed.

OAGr avatar Feb 08 '24 22:02 OAGr

Renaming is easy, but we also should keep old names as aliases. E.g., reduce(arr, 1, multiply) is convenient.

So we'll have to duplicate code (ugh), or support aliases: ... in FRFunction (preferable).

On naming, I suggest we go either with operator names, internally, or with #add.

berekuk avatar Mar 29 '24 01:03 berekuk

On naming, I suggest we go either with operator names, internally, or with #add.

Operator names are nice in that we won't have to invent new names, but #add tokens are more greppable, so I'm leaning towards latter.

berekuk avatar Mar 29 '24 01:03 berekuk