[Jprogramming] invoking object verbs without polluting global namespace

Raul Miller rauldmiller at gmail.com
Mon Nov 9 14:34:39 UTC 2015


On Mon, Nov 9, 2015 at 8:22 AM, Joe Bogner <joebogner at gmail.com> wrote:
> Thank you. I had this thought as well but couldn't get it to work. I
> may not have  a full grasp on how cocurrent works
>
> I define st as 'switch to table locale' and sb as 'switch to base locale'
>
> I defined them explicitly
>
> My first attempt:
...
> sb=: 3 : 0
> cocurrent 'base'
> y
> )

http://www.jsoftware.com/help/dictionary/dx018.htm

"
18!:4 y
Switch Current. Switch the current locale to y at the end of the
currently executing named verb. Initially the current locale is base .
"

You either need to use ([ cocurrent bind 'base') instead of sb, or use
18!:4 in sb .

locale handling has to do with name resolution - not just in terms of
what gets resolved, but also in terms of context.

Thanks,

-- 
Raul


More information about the Programming mailing list