Raul said:
>  I have not found anything in J's dictionary conflicting with
>  this behavior.

Well, the Dictionary explicitly forbids it:

           NB.  http://www.jsoftware.com/help/dictionary/d310n.htm
           2605 174 qdoj ':'
        2.  The explicit result is the result of the last 
            non-test block sentence executed; that result
            must be a noun in the 3 : and 4 : cases.
        

           NB.  http://www.jsoftware.com/help/dictionary/errors.htm
           5684 239 qdoj 'errors'
        syntax error   )   the result of a sentence is not a 
                           noun/verb/adverb/conjunction; a verb 
                           attempting to produce a verb/adverb/
                           conjunction result

Because a verb returning a verb is currently an error, I think (but I am by no 
means positive) that your change is backwards compatible (i.e. nothing else 
*should* depend on the result of a verb attempting to return a verb, but since 
the behavior in this case is explicitly defined, it *could*).

OTOH, I believe this change is large and subtle, and for those reasons requires 
exceptional justification.  IMO your example does not suffice:

>  That would eliminate the trailing `'''' from explicit verbs
>  like
>     3 :'+/,([-.-.)&y`'''''&>

You could achieve the same result now, without the quote characters:

           3 : '+/,([-.-.)&y`(i.0)'  NB.  Or  $~0  or  ;a:  etc.
           3 : '+/,{.([-.-.)&y`]'

BTW,  I don't quite understand your code's intentions, but did you mean:

           3 : '([:+/ , [-.-.)&y`(i.0)'  

instead?  The way you've written it, it looks like you'll make a gerund of  
([-.-.)&, then ravel that, then sum it.  Since the ravel of the gerund is a 
1-atom list, the sum does nothing.  

-Dan


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

Reply via email to