Gauche icon indicating copy to clipboard operation
Gauche copied to clipboard

Make srfi/*.scm main implementation files

Open shirok opened this issue 4 years ago • 2 comments

Currently, many srfis are implemented in srfi-.scm, and we have an alias in srfi/.scm which are auto-generated from srfis.scm.

It is advantageous to make srfi/.scm implementation and srfi-.scm alias, however.

  • R7RS code imports (srfi n), so it's more consistent that Gauche code imports srfi.n.
  • When we implement draft srfi, we may have test code that imports (srfi n). However, currently the srfi/n.scm alias is only made if we have the entry in srfis.scm, but the entry only added when the srfi is officially supported.

shirok avatar Apr 27 '20 09:04 shirok

It is advantageous to make srfi/.scm implementation and srfi-.scm alias

Out of curiosity, what are the advantages?

pclouds avatar Apr 27 '20 10:04 pclouds

As I itemized below that line. The more important one is the second factor; before srfi becomes finalized, I don't want to add its entry to src/srfis.scm, because adding entry to it means it's officially supported. If it isn't in src/srfis.scm, however, srfi/N.scm isn't created automatically. On the other hand, the tests from the reference implementation refers it with (srfi n), so we need srfi/N.scm to run the test.

shirok avatar Apr 27 '20 17:04 shirok