I don’t have any concrete example that’s actually
expensive in terms of time or space (where space
means “memory”) but in place of >: in the verb
example, there could be any function, it could
take hours. This is no less true for conjunctions.
And I don’t want this to be called each and every
time I use it when the arguments have already
been given when defining the verb.

Furthermore, this may be arbitrarily deeply nested.
Say you build a couple of conjunctions atop of
each other, you use the derived verb to define
another one and maybe a library on top
of them where it will be called routinely.

It is a good idea to evaluate constant expressions
as soon as possible and that’s why J does it in the
case of functions. I don’t see any reason to treat
conjunctions differently.

Maybe I’ll make up a resource demanding example
but the point should be clear without.

Am 16.02.20 um 10:22 schrieb bill lam:
Why do you think there will be major savings of
computational resources? Can you give a concrete
example?

Sun, 16 Feb 2020, Hauke Rehr написал(а):
Hello everybody,

I recently stumbled upon some at least
for me counterintuitive (read: puzzling) behaviour:

In a verb like (>: X) {~ ], when X is a defined constant,
the constant expression (>: X) is substituted in the verb (as expected)
but in a conjunction M c N, when M and N are defined constant nouns,
constant expressions are not substituted in c’s body (not expected)

I would not want m c n to be evaluated time and again
when some part of it, just like in the case of the verb above,
could be evaluated once when defining the derived verb.
This should result in major savings of computational
resources so I’d have expected J to do this.

could anyone tell me why this is different from verbs?

kind regards,
Hauke Rehr
(Jena, Germany)


--
----------------------
mail written using NEO
neo-layout.org

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


--
----------------------
mail written using NEO
neo-layout.org

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

Reply via email to