On Mon, Sep 26, 2011 at 5:13 PM, The Geeko <[email protected]> wrote: > Raul Miller <rauldmiller <at> gmail.com> writes: >> What are the names of those two verbs? How are they used? > Oh come on! You're playing with me, aren't you??! LOL > The famous dysfunctional family: nl_z_ and names_z_ who don't play nice with > namelist_z_. LOL
Oh... in other words "the two existing verbs" are not verbs that you have defined, but verbs that you want to replace -- they are non-issues then (since they both underdefine and overdefine the problem, we need an independent specification of what you really want to accomplish). And, for that matter, nl_z_ is part of the definition of names_z_. > see as the one factor that sets J apart from Haskell and Scala. Well, there's > lots that set it apart from both of those... but from what I have been told, > the > tacit aspect of J is a premium feature. It's... surprisingly simple (and convenient, once you get used to it). >> > Is there a way for me to know which locale was current when >> > mynl was invoked? >> >> No. Yes. What do you mean? >> >> You can find the locale you are executing in (coname will tell you >> this). This may be what you are looking for, here, but I think it's >> the wrong approach. > Oh? why would it be wrong to approach the issue from the other side of the > mirror? Go on... It's a patch on a hack? In other words, rather than starting with an approach that does not give you the answer that you want and adding complexity to modify it so that it does give you the answer you want, wouldn't it be a lot simpler to start with an approach that gives you the answer you want? Mind you, whatever works is a good starting point, but even after you get it working I would prefer to replace the complicated explicit mechanism (get the names, check if x and y are defined in the locale, remove them if they are not) with the simpler tacit mechanism (get the names). >> > (2) Regarding line [20], isn't this unreachable? >> >> Consider what happens when names is passed a literal right argument. >> >> That said, I have not thought about this use case and do not know why >> anyone would want it. > Right... I've tried passing different values to get it to travel this path... > I > can't seem to force a test case for this use case. names 'ab' nl 'ab' both seem to hit that line. Or did I not understand your question? That said, now that I think about it, I understand how this was meant to be used. For example: names namelist_z_ 0 1 2 3 -- Raul ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
