|my view on PL module systems
||[Mar. 15th, 2017|09:16 am]
Here is what I want to see in a module system for Scheme (or any PL).
- File and directory names are module names. I mean, we already disperse program code over the file system. (It’s not the only choice. We can store code in a relational database.) Appending another set of names to file system names may be misleading. Imaging that a file “vector graphics” contains a module “raster graphics”. Seriously, it’s not funny.
- Linkage mostly is not specific to PLs. So the linkage language should be separate from PLs, and linkage information should be stored outside files with program code. Thus we can use 1 linkage language with various PLs.
- Optimize for the common case. Resolution of names can be made very complex. Forcing all programmers to learn a complex module system because a minority wants a peculiar feature is not efficient. The minority should program and extend the module system as they wish.
- A user has the final vote on linkage. The user delegates linkage decisions to authors of programs, but he/she should have a capability to override them.
- Linux distributions already have package managers. Using them would be prudent. I mean, if you did not come up with anything better, you would be reinventing the wheel.