[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] add language/wisp to Guile?
From: |
Maxime Devos |
Subject: |
Re: [PATCH] add language/wisp to Guile? |
Date: |
Thu, 23 Feb 2023 19:22:05 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.0 |
On 23-02-2023 19:04, Maxime Devos wrote:
Still doesn't really address the problem though, as Scheme scripts (or
scripts in another language) may need to start with a shebang and
"#!lang" or "#lang" is not a valid comment in all languages. (E.g., I
don't think it's valid Pascal, though I only have read some Pascal
code, I haven't looked at the specification.)
I think itmust be ignored in all languages that work as scripts in
POSIX. So I would expect that support for ignoring #!... in the first
line is very widespread.
The problem is that not all languages were made with POSIX-style scripts
in mind, e.g. Pascal, BASIC and Java (*).
I forgot about the following:
Also since the language implementation is in Guile, this could simply be
added for Guile. That may prevent using this file from other
implementations of the language, but it should work well enough as a
first step.
I disagree, because there is an alternative solution that should be
straightforward and avoids the downside of making an extension to the
language that could confuse other implementations.
Quoting myself:
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, [...]
E.g.:
;; -*- insert-bikeshed-here: scheme -*-
// -*- insert-bikeshed-here: c++ -*-
# -*- insert-bikeshed-here: ecmascript -*-
/* -*- insert-bikeshed-here: c -*- */
{*** *- insert-bikeshed-here: pascal -*- ***}
REM -*- insert-bikeshed-here: basic -*-
I suppose the decision could be made to add support for "#lang" for
compatibility with Racket when 'lang' is some language Racket supports,
despite the fact that "#lang" is invalid in some of those languages, but
IMO we should avoid adding new extensions that confuse ‘native’
implementations when something compatible like "-*- ... -*-" can be done
instead.
Greetings,
Maxime.
OpenPGP_0x49E3EE22191725EE.asc
Description: OpenPGP public key
OpenPGP_signature
Description: OpenPGP digital signature
- Re: [PATCH] add language/wisp to Guile?, (continued)
- Re: [PATCH] add language/wisp to Guile?, Philip McGrath, 2023/02/26
- Re: [PATCH] add language/wisp to Guile?, Maxime Devos, 2023/02/26
- Re: [PATCH] add language/wisp to Guile?, Dr. Arne Babenhauserheide, 2023/02/26
- Re: [PATCH] add language/wisp to Guile?, Matt Wette, 2023/02/26
- Re: [PATCH] add language/wisp to Guile?, Dr. Arne Babenhauserheide, 2023/02/26
- Re: [PATCH] add language/wisp to Guile?, Matt Wette, 2023/02/26
- Re: [PATCH] add language/wisp to Guile?, Dr. Arne Babenhauserheide, 2023/02/26
- Re: [PATCH] add language/wisp to Guile?, Maxime Devos, 2023/02/23
- Re: [PATCH] add language/wisp to Guile?, Dr. Arne Babenhauserheide, 2023/02/23
- Re: [PATCH] add language/wisp to Guile?, Maxime Devos, 2023/02/23
- Re: [PATCH] add language/wisp to Guile?,
Maxime Devos <=
- Re: [PATCH] add language/wisp to Guile?, Maxime Devos, 2023/02/23
- Re: [PATCH] add language/wisp to Guile?, Maxime Devos, 2023/02/23
- Re: [PATCH] add language/wisp to Guile?, Dr. Arne Babenhauserheide, 2023/02/15
- Re: [PATCH] add language/wisp to Guile?, Maxime Devos, 2023/02/15
- Re: [PATCH] add language/wisp to Guile?, Dr. Arne Babenhauserheide, 2023/02/16
Re: [PATCH] add language/wisp to Guile?, Dr. Arne Babenhauserheide, 2023/02/16
Re: [PATCH] add language/wisp to Guile?, Marc Nieper-Wißkirchen, 2023/02/26