in the pdfcircle function, if all 4 parameters (v e c p) are numbers, then a 
list of 4 items can be passed to the function.  But more generally if 
parameters are different types and/or shapes, than boxed arguments is the 
general way of processing multiple arguments on left or right.




________________________________
From: Andrew Dabrowski <[email protected]>
To: [email protected] 
Sent: Sunday, November 19, 2017 4:02 PM
Subject: Re: [Jprogramming] initial reaction to J



Thank /you/ for /your/ comments.

I'll look through the repos, thanks for the link.

Could one say J's intention is the following? Be a great array 
processing language, and since utility functions for arrays are 
naturally binary or ternary at worst therefore the built-in verbs 
provide a great basis for array hacking while the programmer can focus 
on higher level tasks by defining higher arity functions explicitly.

I still think J puts unnecessary hurdles in the way of defining higher 
arity functions.  In the link you sent me I see

pdfcircle=: 3 : 0
'v e c p'=. y
p=. citemize p

where I presume citemize is a utility function for extracting lists from 
some container.  Suppose p had rank 2 or higher, would citemize have to 
be called again?  Where can I look up citemize anyway?  I have no idea 
how to find it from the NuVoc page.

If the arguments to a function are to be a scalar x, a list y, and a 
rank 2 table z, each has to be boxed before passing them to function, 
right?  Coming from languages like Mathematica and Clojure that support 
destructuring, this is a turn-off, but I can see that once you get used 
to it it's not that big a deal.



On 11/19/2017 02:45 PM, chris burke wrote:
>
> This issue of tacit vs explicit comes up from time to time, and I'll repeat
> an earlier comment that tacit is over-emphasized in the J forums. In
> production systems, most programs are explicit, while tacit is used where
> appropriate, rather than used because of a desire to look cool.
> Essentially, J gives you the choice and programmers just pick what suits
> the problem.
>
> Browse through the J repos to see this. For example, in the recent addon
> script,
> http://jsoftware.com/websvn/wsvn/public/trunk/graphics/pdfdraw/source/base/draw.ijs
> , all definitions are explicit. Note that the first takes a right argument
> with 4 values, so "arity" hardly matters.
>
>
>

----------------------------------------------------------------------
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