On 24-02-2023 16:45, Ludovic Courtès wrote: >>> Adding #lang support in Guile would be nice. As discussed on IRC, it >>> can be experimented with in a WIP branch. >> Have you seen my messages on how the "#lang" construct is problematic >> for some languages, and how alternatives like "[comment delimiter] -*- >> stuff: scheme/ecmascript/... -*- [comment delimiter]" appear to be >> equally simple (*) and not have any downsides (**). >> >> (*) The port encoding detection supports "-*- coding: whatever -*-", >> presumably that functionality could be reused. >> >> (**) For compatibility with Racket, it's not like we couldn't >> implement both "#lang" and "-*- stuff: language -*-". > I haven’t seen your messages yet, I just wanted to express support of > the general idea. For years, we have discussed #lang support; I know > Andy is enthusiastic about it, and while I was initially reluctant, I’ve > come to appreciate the idea. > > What you point out is worth considering, but note that Guile already > supports #!r6rs for instance. While I initially thought that #!r6rs was problematic, it was pointed out to me that #!r6rs is actually in the R6RS (unlike #lang, and even if #lang was in the R6RS, it isn't in the de-jure or de-factor standards of many other languages). As such, #!r6rs is a different (unproblematic) situation compared to #lang -- #lang is not the same as #!r6rs from a compatibility perspective. Greetings, Maxime.