On Thu, Nov 14, 2013 at 9:45 AM, Pascal Jasmin <[email protected]> wrote:
> >  A trivial example would be a tacit expression which includes an
> >  explicitly defined verb in a train.
>
> I think you'd only be able to assign a local that works inside only
> the embedded explicit verb.  assigning a global works, but would
> feel wrong for just obtaining intermediate results.

In addition to assigning a global (or a member of a locale [class or
object]), it's also possible to communicate outside the language
(either to the file system or the internet.

But, yes, you are right - typically you want to be conservative
about such activities.

> >  inherent in the concept of OOP. OOP is about references
> >  to objects and if you eliminate the references they go away.
>
> Not to make a too complicated example, but
>
> of_z_ =: 4 : 'x ,''_'', '' ''((i.~ }. ]),~''_'', ~ i.~ {. ]) > y'("1 0)
> from_z_=: ".@:of
>
> the above 2 verbs will allow applying code to a series of locales.

As near as I can tell, your left argument for 'of' is a list of equal
length sentences where the last word in the sentence is a name in some
arbitrary locale (specified by the right argument of 'of'). In other
words, here are a couple experiments:

   'this is a test' of ;:'this is a test'
this is a test_this_
this is a test_is_
this is a test_a_
this is a test_test_
   (>;:'this is a test') of ;:'this is a test'
this_this_
is  _is_
a   _a_
test_test_

So I think I'd simplify the definition to this:

of_z_=: 4 :'x,''_'',''_'',~>y'"1 0

> 'myprop' from (reflist__myobj {~ (select subitems of list))
>
> the above code will freeze reflist__myobj to whatever reflist__myobj
> evaluates to at time of definition.  That creates an error on load
> if myobj has yet to be initialized (say its a db object that will be
> initialized after load), and it gives wrong results if you ever
> "reinititalize" myobj or list__myobj (change db).

I'd have to see the definitions of the words you use, or example
before/after data, before I could really understand what you've said
here.

Until then, I understand that this code would do stuff.

Thanks,

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

Reply via email to