We need to handle script libraries (instruments, effects, waves etc) in a sane and organized fashion.
A2S modules and host applications should be able to pull scripts from multiple sources:
Official A2 libraries (installed system wide with any full A2 install)
System wide installed libraries (for example, common assets used within a gamedev team)
User installed libraries (extra libraries installed in the user's home directory)
Private application libraries (what we have now: scripts distributed along with a project)
There needs to be strict versioning, so extended or modified scripts don't break old A2S code, or that A2 can at least detect and warn about potential incompatibilities.
The naïve approach to versioning is to just import specific versions of things, and declare that once a library has been officially released, there must be no changes in interfaces and functionality; only bug fixes and performance optimizations. Simple and robust, but not very practical.
For script libraries to be seriously useful and maintainable, we probably can't get away with much less than a typical major.minor.micro versioning system;
Different major versions are assumed to be entirely incompatible (different libraries, basically)
New minor versions can only ever add new features; never remove or change existing features
Micro versions are for safe bug fixes, and performance optimizations
The 'import' directive would get an optional version argument, to specify the required major version, and minimum micro version. If no version is specified, A2 will used the newest version it can find - but if this is done with anything but private application libraries, the compiler should probably issue a warning, because scripts like that will break sooner or later.
We need to handle script libraries (instruments, effects, waves etc) in a sane and organized fashion.
The naïve approach to versioning is to just import specific versions of things, and declare that once a library has been officially released, there must be no changes in interfaces and functionality; only bug fixes and performance optimizations. Simple and robust, but not very practical.
For script libraries to be seriously useful and maintainable, we probably can't get away with much less than a typical major.minor.micro versioning system;
The 'import' directive would get an optional version argument, to specify the required major version, and minimum micro version. If no version is specified, A2 will used the newest version it can find - but if this is done with anything but private application libraries, the compiler should probably issue a warning, because scripts like that will break sooner or later.