Re: [q-lang-users] New stuff in cvs: multichar ops, views
Brought to you by:
agraef
From: Rob H. <hub...@gm...> - 2007-06-28 10:19:52
|
Hello, On 28/06/07, Albert Graef <Dr....@t-...> wrote: > Well, I see a rationale behind this, as :+ really is an addition > operator, so there is a case for treating it as such. This is a rare occasion where I *strongly* disagree. The purpose of (+:) is to form complex numbers syntactically, when they are in some sense 'atomic' or 'literal' semantically. For (+:) to bind so weakly (i.e. as if it is an ordinary addition operator) makes its behaviour surprising. Python get this wrong, but only because it really does just use the ordinary + operator. Haskell certainly gets this wrong. Please don't let Q follow suit and also get this wrong. ==> 1+:2 * 3+:4 1+:10 // is wrong (and surprising) -5+:10 // is right Rob. |