I can't speak for best practive or guidelines, because I have seen very little
production J code that I didn't write. But one method I've used is indirect
assignment:
columns =: ;: 'nationality color pets drink cigs'
(columns ,L:0 '_idx')=:i.#grid
pets_idx { grid
+----+-----+----+------+----+
|Dogs|Birds|Cats|Horses|Fish|
+----+-----+----+------+----+
But one of my failings is that I take abstraction to extremes. I would not
have stopped at this point.
-Dan
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm