3 ms·
re: ""As it is, the 'module' concept is strictly tied to a file, which feels unnecessary."" In Common Lisp you get to decide which package each source file con
by mark_l_watson 7y ago
re: ""As it is, the 'module' concept is strictly tied to a file, which feels unnecessary.""
In Common Lisp you get to decide which package each source file contributes to. For utilities that are (or will be) used for multiple projects, I use a different package for each library and for small libraries it is likely that all the code will be in one file (plus a project and 'asd' file, details for which aren't important here).
For non-library projects, like a complete application, I usually use many source files that all contribute to the same package.
The point is that a Lisp like Common Lisp is almost infinitely flexible, but it really helps if you have a standard way that you like to set up your projects.
I used to, back in the 1980s, use a hardware Lisp Machine where all my work was in one environment. I feel like I have something similar now by maintaining a large mono git repo for all of my work and research in Common Lisp. The Quicklisp package manager keeps my own packages and all 3rd party packages available to me in a transparent way.
I love my own working environment, but if you go down the Lisp path, you should get an environment set up that is right for you.
- kazinator 7y agoIn Common Lisp, you get to decide which package each individual token of source code contributes to. If a package abc exists, we can write abc::def. Now the abc::def symbol exists, if it did not before: the symbol named "DEF" in the package named "ABC". If we write (defun abc::def ...) we are binding that symbol to a function. Informally speaking, we are defining a function def in pakage abc.