default&$: : ... I thought there was something like this... The explicit form:
foo =: verb define default foo y : ... always seemed somehow wrong in its redundancy, a limit to the collapsability of J code. Given that my history of J development precedes the debugging facilities (he\_\_, I don't even use []stop and []trace in APL all that much.) the limitations that a tacit default-leftarg form puts on debugging is immaterial to me. Back to the original topic: I liked the Perl idea of having a specifiable termination string, which does allow nesting, which in J could be: aVerb =: 3 : !. '>>' 0 ... >> ------------------------------------------------------------------------ |\/| Randy A MacDonald | APL: If you can say it, it's done.. (ram) |/\| [EMAIL PROTECTED] | |\ | | The only real problem with APL is that BSc(Math) UNBF'83 | it is "still ahead of its time." Sapere Aude | - Morten Kromberg Natural Born APL'er | Demo website: http://156.34.66.168/ -----------------------------------------------------(INTP)----{ gnat }- ----- Original Message ----- From: "Oleg Kobchenko" <[EMAIL PROTECTED]> To: "Programming forum" <[email protected]> Sent: Wednesday, February 14, 2007 2:53 AM Subject: RE: [Jprogramming] Possible to nest multiline noundefinitionwithinverb definition? > --- Dan Bron <[EMAIL PROTECTED]> wrote: > > > Raul suggested: > > > > > GetPrices=:(0 :0)&(4 :0) > > > > I would warn you away from this pattern if you use or intend to use the J debugging facilities. > > The dyad within the monad GetPrice is anonymous, and consequently atomic from the J debugger's > > POV; hence undebuggable. > > > > That said, I've found this a useful idiom in many cases. > > That's true, moreover an even more benign pattern > of default left argument > > v=: xx&$: : (4 : 0) > ... > > is perilous for debugging or further linear representation. > > So the best approach is, keep it simple. > > There is more in JHP "examples" of SQL builders > and HTML snippet builders using explicit definitions. > > > > > ____________________________________________________________________________ ________ > The fish are biting. > Get more visitors on your site using Yahoo! Search Marketing. > http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
