I’m maintaining a large code base in J, and a few rare functions and variables end with __ (two underscores).
Normally, __ is used to reference something in a locale.
barObj =: conew 'Bar'
Foo__barObj
However, I have this:
Foo__
Declared as:
Foo__=: 3 : 0
Is that another syntax for a static function? Is it accessible to all locales?
EDIT:
From what I can gather, it’s not local. A variable declared thus:
FooVar__ =.
can be referenced by another function, despite =. making it seem local. The same way any “into locale” declarations are always “global to the locale” (Foo__Bar =. and Foo__Bar =: are the same).
Ending with double-underscore is an old technique for referencing a name in the base locale. Here are details from the relevant part of the Locale lab: