On Sun, Nov 17, 2013 at 12:12 PM, Pascal Jasmin <[email protected]> wrote:
>> And it's rather trivial for a conjunction
> to access the state of its native locale (just be explicit about
> that).
>
> It's trivial for static locale, but fails for numbered locales derived with
> conew, because the code will never have access to the number unless
> the caller passes it. -- which is the workaround I've used.

That's one fairly easy mechanism. Another mechanism involves conew.

> In terms of OOP (numbered locale) use, its not fair to say it should
> be avoided for J.  If a table, file, database, socket connection are
> usefully encapsulated in a locale, then the concept that you might
> want to have more than one of these in your program makes numbered
> locales relevant.

And yet, t should be avoided sometimes and not other times.

Another issue with J's locales is: if they are misused you run into
resource issues. Just like any other computational mechanism, sometimes
resources matter.

And you can, of course, have conew create a new instance of the
conjunction in the numbered locale. The cost should be trivial
(unless you are misusing the concept).

Remember that conew knows about the new locale and runs before anything
else in that locale.

Thanks,

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

Reply via email to