On Fri, 19 Mar 2021 00:17:59 -0400 John Cowan <xxxxxx@ccil.org> wrote: > > The good thing here is that we have a separation of concerns here: > >>> > > >>> > (1) Signifying that a file is to be parsed with a specific reader. > >>> > (2) Extending the built-in reader. > >>> > >> > >> The first is more general, if less convenient. > >> > > > > There may be some misunderstanding. (1) is not an alternative to (2) but > > both go hand-in-hand. > > > > For which use cases, other than changing the lexical syntax in the middle > of a file (compilation unit), can #2 do the job but not #1? From what I see we don't need #2 at all. Because if we have #1 I can write my own reader that allow to extend itself. I can then package that reader as extendable reader that allow of extension by set-syntax! this reader can be specified by different spec that will use the #1. I think that we don't need to extend built-in reader if we can change the reader. User can specify library using extendable reader and use set-special! is his library. From what I see in this discussion is that we can't allow to extend built-in reader that's why we need to change the reader. -- Jakub T. Jankiewicz, Web Developer https://jcubic.pl/me