Depends on which argument is "data" (calculated, changes frequently) and which 
is control (fixed, or changes infrequently wrt the data).  

In other words, if you wanted to make a reusable verb, which is more likely in 
your context:

     deal =:  3&?

or

     deal =:  ?&10

?

If the former (which is more common), I'd be inclined to write 3?10 10 10.  If 
the latter, I'd be inclined to write 10 ?~ 3 3 3.

My inclinations stem from the facts that it is easier for me to scan code if I 
know I can expect controls on the left and data on the right, and it's easier 
for me to write code if I can incrementally build up data right-to-left, rather 
than using nested parens.

But I also have to be wary of the hobgoblins of consistency.

-Dan



Please excuse typos; composed on a handheld device.

-----Original Message-----
From: Raul Miller <[email protected]>
Sender: [email protected]
Date: Tue, 15 Mar 2011 11:12:10 
To: Programming forum<[email protected]>
Reply-To: Programming forum <[email protected]>
Subject: Re: [Jprogramming] Deal

On Tue, Mar 15, 2011 at 11:03 AM, Bo Jacoby <[email protected]> wrote:
> 3 3 3?10   is two characters shorter than   3?10 10 10   and so it should be 
> preferred.

And 3?3#10 is shorter than both, though is closer to 3?10 10 10 than 3 3 3?10.

-- 
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to