On 16-02-2023 22:38, Dr. Arne Babenhauserheide wrote:
Matt Wette <matt.we...@gmail.com> writes:You may be interested in the load-lang patch I generated a few years ago to allow file-extension based loading, in addition to '#lang elisp" type hooks. https://github.com/mwette/guile-contrib/blob/main/patch/3.0.8/load-lang.patch@Maxime: Is this something you’d be interested in championing?
For the '#lang whatever stuff', no:The '#lang whatever' stuff makes Scheme (*) files unportable between implementations, as '#lang scheme' is not a valid comment -- there exist Schemes beyond Guile and Racket. If it were changed to recognising '-*- mode: scheme -*-' or '-*- language: scheme -*-' or such, it would be better IMO, but insufficient, because (^).
(*) Same argument applies for some, but not all, other non-Scheme languages too.
I'm assuming you don't meant the '%file-extension-map' stuff, because of your previous ‘[...] and also to avoid stumbling over files that just take that extension’ response to the proposal for such a thing. Even if you meant that, (^) also applies.
(^) it doesn't integrate with the module system -- more concretely, (use-modules (foo)) wouldn't try loading foo.js -- adding '-x' arguments would solve that, but we agree that that would be unreasonable in many situations. (Alternatively one could place ECMAScript code in a file with extension '.scm' with a '#lang' / '-*- mode: ecmascript -*-', but ... no.)
Aside from the '#lang ...' -> '-*- language: scheme -*-' stuff, I think the idea behind the patch is good (**) -- it solves the problem it aims to solve, AFAICT. However, this problem is not the module system problem that Wisp currently has.
As such, I suppose you could say that I would 'champion' the patch on its own, but not champion it in relation to '[PATCH] add language/wisp to Guile'.
(**) It needs some documentation though. Greetings, Maxime.
OpenPGP_0x49E3EE22191725EE.asc
Description: OpenPGP public key
OpenPGP_signature
Description: OpenPGP digital signature