>
> Also another question: is it possible, as in Haskell, to define new
>
infix operators


No. There was some discussion of supporting Haskell-like custom infix with
backticks, but I don't think anyone ever tried to implement it. (and if
backticks syntax is ever freed-up, there are probably higher priority
uses...). See here:

https://github.com/JuliaLang/julia/issues/4498

On Tue, Apr 5, 2016 at 9:13 AM, Didier Verna <did...@didierverna.net> wrote:

>
>   Hi,
>
> the user manual says this (VARIABLES section):
>
> "Operators like + are also valid identifiers, but are parsed
> specially. In some contexts, operators can be used just like variables;
> for example (+) refers to the addition function, and (+) = f will
> reassign it."
>
> This looks like Haskell's bridge between the infix and prefix
> syntax. However, it seems that contrary to what the manual says, you
> don't need the parenthesis, i.e. I can do just x = f. So is there a real
> reason for using (+) ?
>
> Also another question: is it possible, as in Haskell, to define new
> infix operators, or are you restricted[1] to the built-in ones ?
>
> Thanks.
>
>
> Footnotes:
> [1]  by "restricted" here, I don't mean to say that there are too few of
> them; I'm aware the unicode ones are available.
>
> --
> Resistance is futile. You will be jazzimilated.
>
> Lisp, Jazz, Aïkido: http://www.didierverna.info
>

Reply via email to