Side comment: ± should probably be allowed as a unary operator.

On Wed, Jun 22, 2016 at 3:39 PM, Kaj Wiik <[email protected]> wrote:

> To wrap this item up, it would be good to know where the distinction
> (parsing) is done in sources?
>
> Thanks,
> Kaj
>
>
> On Wednesday, June 22, 2016 at 5:03:09 PM UTC+3, Steven G. Johnson wrote:
>>
>>
>>
>> On Wednesday, June 22, 2016 at 2:34:00 PM UTC+1, Kaj Wiik wrote:
>>>
>>> Yes, it is probably a binary operator but searches fail to find it.
>>>
>>
>> Certain symbols are parsed as operators, and others are parsed as
>> identifiers.  This is independent of whether that symbol is defined in Base.
>>
>> For example α is parsed as an identifier (which is not defined in Base).
>>  ± and ⊕, on the other hand, are parsed as binary operators (which are also
>> not defined in Base).
>>
>> For something parsed as a binary operator, if you want to give it a
>> definition you should define it as a two-argument function, e.g. ⊕(x,y) = x
>> .+ 2y ....   then e.g. a⊕b will correspond to the function call ⊕(a,b).
>>
>

Reply via email to