Hi Thomas and welcome, The only convention that I have seen consistently applied is that global constants are ALL CAPS. Beyond that, J programmers tend to keep their variable names short, but hopefully meaningful.
Another area to be careful of is the use of '_' since names such as a_base_ would define the variable 'a' in the 'base' locale (similar to a workspace). 'base' is the locale that you are in with the default start up in J. The other locale that is initially defined is 'z' which is a library of useful J parts of speech. The 'z' locale is always searched from the 'base' locale so that you have access to these tools without cluttering up 'base'. Also, be careful if you are defining any variables in the'z' locale to check that the name has not already been used because if it has you may be overwriting a definition in use for other parts of J. There is a lab on locales if you would like to know more about them. Others who are more involved with the writing of 'z' definitions may have better advice on naming conventions. It will give us both an opportunity to learn. Cheers, bob > On Dec 2, 2018, at 4:54 AM, Thomas Bulka <[email protected]> wrote: > > Hello Forum, > > I recently started programming in J (by now mainly for the purpose of > educating myself) and I'm impressed by the terseness that can be achieved in > expressing your ideas. However, being still a beginner, I'm not sure whether > there are well established naming conventions among the J community. > > For instance: How are verbs/variables/etc. named in an idiomatic way > (camelCase? under_scores? What about case?)? Browsing through available > example source code did not yet give me a clear intuition of how these things > are handled in the J community. > > If there are any established conventions, I would very much appreciate any > link to the respective documentation. > > Regards, > > Thomas > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
