Directories are hierarchical - you can have a directory "inside" another
directory.

There's no way of doing that with locales - they all exist on the same
level (though of course you can have a reference to any locale inside any
locale).

Thanks,

-- 
Raul



On Sat, Mar 1, 2014 at 12:25 AM, Don Guinn <dongu...@gmail.com> wrote:

> I don't understand what you mean when you say "locals are not
> hierarchical". Locales are just name spaces. Locales are implicitly
> referenced through path (18!:2). The path determines how locales are
> searched to resolve a name not found in the current locale. This search is
> hierarchical. The locales are searched in the order specified in 18!:2. But
> each locale has its own path. In this way the hierarchy of locales depends
> on the current locale. In this way it is easy to implement classes in J.
> But paths can be used outside of J classes in interesting ways.
>
>
> On Fri, Feb 28, 2014 at 8:52 PM, Steven Taylor <tayl...@gmail.com> wrote:
>
> > the verbname__location / verbname_location_ format places more emphasis
> on
> > the verb or noun inside that locale (assuming a left to right cultural
> > reading orientation).  That appears illogical because nobody else does
> > that, however it can help with readability if you can get used to it.
> >
> > It also helps if you can flatten out the locale 'tree' (although locales
> > are not hierarchical).  I mean just symantically.
> >
> > I found the process of re-evaluating how I initially thought namespaces
> > 'should' work refreshing and overall I think locales have helped me make
> > better namespace naming choices in other more verbose languages.
> >
> > I'd also encourage considering locales outside of a strict oo context.
> >  Try to stay away from state when possible.
> >
> > This is so obvious I am embarrassed that it took me so long to consider
> > this -- there are French and english 'locales' in Canada... And I thought
> > this sense of the word may have been behind J's use of it.  Probably
> that's
> > obvious to everyone in north America ;-).
> >
> > If you find yourself writing
> > A wrapper just around a structure like this
> > Dictionary<string,Dictionary<string,obj>>, you'll know that locales have
> > grown on you.  I may have done that recently
> > ;)
> >
> > -Steven T.
> >
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> >
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to