Indexing with // is a bit undesirable because 6//3 gets simplified to 2//1 upon 
construction, and there's no reason to pay the cost of that operation.

With \\, would you worry about confusion from the fact that in a \\ b, a is in 
the denominator? Especially if it gets called the "integer division operator."

One could use ///, but that's starting to be pretty comparable to \div[TAB], 
and less pretty to read.

--Tim


On Sunday, April 03, 2016 05:56:26 AM Scott Jones wrote:
> For some reason, my posts are getting sent prematurely!  Continuing:
> 
> Since the integer division operator // of Python (2&3) and Lua already
> means something important in Julia, and \ is also taken, I'd like to
> propose \\ as an integer division operator for Julia.
> Having to always type \ d i v <tab> in the REPL, and something different in
> Emacs, or write things out as `div(a, b)` (6 characters typed!), is rather
> annoying, \\ is just a syntax error currently in Julia
> and could easily be added to the parser and made a synonym to div (÷).

Reply via email to