Just to keep things in perspective, this topic was
discussed earlier under

[Jgeneral] Transformational Multiline Functions
http://www.jsoftware.com/pipermail/general/2006-December/028252.html

The proposed "muldef" yields definitions which
are both readable and nicely debuggable.


--- "Sherlock, Ric" <[EMAIL PROTECTED]> wrote:

> Thanks for the dyad example and yes stored procedures might be a good
> idea but I'm using SQLite via Oleg's package and that doesn't support
> stored procedures. Bjorn, in my second (fuller) post on the subject I
> discounted appending to the line over multiple lines. I don't know about
> you but I find it tedious & messy (and much harder to copy/paste ;-) )
> 
> I think the "keep it simple" advice I've had from a number of people is
> probably pretty sound, so will probably go that way for now. 
> 
> Being quite new to J I'm not really sure how important it is for the
> debugger to handle this sort of case (especially the anonymous), vs
> coming up with a way of allowing nesting. Would this be useful in more
> general cases, or would finding some way to allow nesting, render it a
> non-issue?
> To me, allowing nesting seems simpler and would result in more readable
> code, but I'm sure I'm not aware of all the issues.
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Miller, Raul D
> Sent: Thursday, 15 February 2007 01:39
> To: Programming forum
> Subject: RE: [Jprogramming] Possible to nest
> multilinenoundefinitionwithinverb definition?
> 
> Dan Bron wrote:
> > 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.
>  
> I consider this a defect in the debugger, and refuse to let it impact my
> code.
>  
> Note that this defect also matters for code like:
>  
> verba=:3 :0"1
>  
> or
>  
> verbb=:3 :0&.>
>  
> etc.
>  
> When I need to use that aspect of the debugger to isolate a problem with
> my code, I'm already in a position where I need to be re-writing my
> code.  And the debugger will tell me which specific function is having
> the problem.  So, in that case, I first rewrite the function to make the
> debugger happy with it, and then use the debugger to find the flaw, and
> then I fix the problem, test some more, and quite probably rewrite some
> more based on the outcome of my testing.
>  
> But you're right that this issue does warrant an occasional warning.
>  
> Finally note that for SQL, I prefer using stored procedures over inline
> code.  There are times when I can't (mysql doesn't support stored
> procedures), so sometimes I have to make allowences there, too.




 
____________________________________________________________________________________
Have a burning question?  
Go to www.Answers.yahoo.com and get answers from real people who know.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to