> A trivial example would be a tacit expression which includes anexplicitly
>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.
> inherent in the concept of OOP. OOP is about referencesto 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.
'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).
----- Original Message -----
From: Raul Miller <[email protected]>
To: Programming forum <[email protected]>
Cc:
Sent: Wednesday, November 13, 2013 10:08:45 PM
Subject: Re: [Jprogramming] semi tacit code
On Wed, Nov 13, 2013 at 8:04 PM, Pascal Jasmin <[email protected]>wrote:
> 1. Its not possible, afaik, to assign an intermediate noun in a tacit
> expression. So this lets you write a "mostly tacit" function that would
> let you save and reuse intermediate results.
>
Unless your definition of tacit explicitly forbids this, I think it is
possible. A trivial example would be a tacit expression which includes an
explicitly defined verb in a train.
> 2. J has OOP features that can be frustrating. If you include obj__myobj
> as part of a fork (an expression that calculates a locale), then the J
> interpreter can fix the locale inside your fork, which it won't do if made
> explicit. I mention OOP, even though it can happen with other nouns,
> because regular nouns have the workaround of "_ to turn them into verbs.
>
I think that that's inherent in the concept of OOP. OOP is about references
to objects and if you eliminate the references they go away.
--
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm