Scheme filename extensions Lassi Kortela 27 May 2020 09:40 UTC

>> There is not a similar convention for Common Lisp's `.lisp` extension.
>> CL data files tend to use the same extension I guess. We've been doing
>> that with Scheme as well, using `.scm` for data.
>
> Not optimal as Scheme library definitions get their own extension
> while Scheme program files don't. We could reuse the R6RS (?)
> extensions "sps" and "sls", of course. Or "spd" and "sld" to keep
> "sld".

Unfortunately this zoo of extensions is very confusing to people who are
not Scheme experts. There are now at least 11 of them, and all of them
are cryptic acronyms.

Ideally there would be just one Scheme extension, and the file contents
would say what kind of Scheme file each is. Otherwise there will be no
end to the number of extensions we need to coin in the future.

> Yes; ".scheme" could be such an extension.

I like ".scheme" a lot, but only if ".scm" is deprecated in favor of
".scheme" :) As a practical matter, ".scm" is very unlikely to be
deprecated, so I would prefer to stick with it for future Scheme stuff.

>> Perhaps the  `meta.scm` file can start with `#!metadata` or something.
>> Would that be considered reader abuse?
>
> Yes, in my opinion, yes. If, these files should identify themselves
> through the s-expressions that are contained within (see my other
> reply).

Fair enough.

> Apart from this, there also a number of (legacy) tools that make a lot
> of use of file extensions (POSIX make is an important example; as are
> various desktop environments and editors), so for quite a lot of time
> to come, file extensions will remain to be important.

I agree. However, there shouldn't be a problem with sticking to one
extension for all kinds of Scheme S-expression files.