Re: [q-lang-users] Q 7.2 RC1 Issue 2: Notation
Brought to you by:
agraef
From: Rob H. <hub...@gm...> - 2006-06-20 07:55:44
|
On 19/06/06, Albert Graef <Dr....@t-...> wrote: > John Cowan wrote: > > I'm not happy with "over" as the notation for rational numbers. > > In particular, "1 over 5+2 over 3" looks totally wrong for 1/5 + 2/3; > > the visual grouping is hopelessly broken. I realize that we can't use > > "/" for this purpose, but can't we use another symbol operator? > So I'm afraid that the only 7 bit ASCII punctuation symbol that's left > is "%" (incidentally, this is also what Haskell uses for the same > purpose). It's been a while since this has been used as a comment > character, so I'd say it's safe to reuse it now. Then you could type > your example as "1%5 + 2%3". Acceptable? > Rob, what's your take on this? Do you prefer "over" or "%"? After all > it's your module. ;-) Please don't use '%' for division. I know that Q is not similar to 'C', but '%' really looks like remainder/modulus to me. If you really need a symbol, can't a compound symbol be used? Perhaps '//', although that would then mean that '/' and '//' would be the "wrong way around" compared to Python. What about some other combination along the lines of '/.', '/^', '/!', ...? I do agree that the formatting would look far better with a symbol than with (over). Rob. |