On Nov 9, 2007 3:47 PM, Dan Bron <[EMAIL PROTECTED]> wrote:
> The short answer to your question is that a fundamental difference between
> tacit and explicit code is that the former can *not* assign variables.
I would state this differently. As I understand it, explicit definition is the
name the dictionary uses for m : n
Given that as the basis for the concept of "explicit", the fundamental
difference between tacit and explicit code has to do with the treatement
of local variables.
With tacit code, variables from the current explicit code's
variable space will be used.
get=: ".bind
set=: [ ,get '=.3!:2 a.{~' , ":@(a.i.3!:1)@]
a=:0 1
'a' get _
0 1
3 :'''a''get _+a=.2+y' 2 3
4 5
'a' set 6 7
6 7
a
6 7
3 :'''a'' set y' 8 9
8 9
a
6 7
P.S. a nicer version of that set verb would be:
serialize=: 3 :'5!:5<''y'''
set=: [ ,get '=.' , [EMAIL PROTECTED]
But I did not want to quibble about whether or not this uses explicit
definition to set the variable.
--
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm