Guides/General FAQ/Workspace
How do I save my workspace in J?
Many newcomers to J have previous experience with APL. Two common questions are:
Q. How do I save my workspace in J?
A. You cannot, instead J uses plain text files, known as scripts. However, if you want to store variables you have created to a file, you can use the WS code explained at File J Variables.
Q. My APL IDE has feature X, can I have this in J?
A. Each feature has to be examined on its own merits. It may be appropriate for APL, but not for J.
The key difference between development in APL and J is the following:
- The APL IDE is designed to support application development where source is stored in an internal binary format, that is inaccessible other than through the IDE.
- The J IDE is designed to support application development where source is stored in plain text files, like other programming languages.
This difference makes for very different IDEs.
For example, J has a Directory Match facility that compares scripts in one directory with another, useful for comparing different versions of an application's source. By default, the comparison uses J's standard compare utility, but you can also invoke an external diff/merge program, and this may be better for large scripts such as a target script. When J compare is insufficient, use a professionally written diff/merge program.
The corresponding APL IDE facility is Workspace Compare, but this has to be written entirely in APL, since there is no way an external diff/merge can examine two files in APL internal binary format to find out which functions changed.
In general, J's IDE is designed to accommodate, and be supplemented by, normal tools for managing source code, such as diff/merge, source code managers, search and replace utilities, other editors like Emacs, etc. In contrast, APL's IDE is designed to do everything, since normal source code tools will not work.
Irrespective of the merits of these two approaches, if you want to work with J, you need to become familiar with source in plain text files. An APL-style workspace is largely inappropriate to J, since not least, it would prevent the normal use of the J IDE and of other external source code tools.
See Also