[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Standardized access to a REPL
From: |
Philip Kaludercic |
Subject: |
Re: Standardized access to a REPL |
Date: |
Sat, 19 Nov 2022 15:03:05 +0000 |
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>>>> `compiled-prog-mode' that has generic commands for building program,
>>>> `interpreted-prog-mode' that has generic commands for REPL
> [...]
>> (define-prog-mode foo
>> :type 'compiled
>
> <soapbox>
> Let me point out that the idea that some languages are compiled and
> others are interpreted is bogus. This is a property of a language's
> *implementation* and not of the language per se.
> And of course, here we don't even really care about this facet of the
> implementation: you're using those terms as a proxy for whether we use
> a REPL or a batch-compiler.
> </soapbox>
>
> Many languages have both REPLs and batch compilers (like, say ELisp), so
> a major mode needs to be able to offer access to both functionalities at
> the same time.
Good point, that also indicates that that using `derive-major-mode' is
not the right approach, because (AFAIK) major modes span a tree, not a
DAG.
Perhaps it would be better to extend prog-mode and bind keys in the
default map that call methods with the current major mode. These can
then either implement the methods or indicate that the feature
(evaluating in a REPL when using C) is not supported.
> Regarding the original suggestion to provide a uniform access to a REPL,
> I started on this a long time ago, but never got it "finished" :-(
> I attached what I still have of that effort.
Sounds interesting, I'll take a look at it.
- Tree-sitter and major mode inheritance, Yuan Fu, 2022/11/16
- Suggesting that feature/tree-sitter be merged (was Re: Tree-sitter and major mode inheritance), Jostein Kjønigsen, 2022/11/18
- Re: Suggesting that feature/tree-sitter be merged (was Re: Tree-sitter and major mode inheritance), Philip Kaludercic, 2022/11/18
- Re: Suggesting that feature/tree-sitter be merged (was Re: Tree-sitter and major mode inheritance), Yuan Fu, 2022/11/18
- Re: Suggesting that feature/tree-sitter be merged (was Re: Tree-sitter and major mode inheritance), Stefan Monnier, 2022/11/18
- Re: Suggesting that feature/tree-sitter be merged (was Re: Tree-sitter and major mode inheritance), Philip Kaludercic, 2022/11/19
- Standardized access to a REPL (was: Suggesting that feature/tree-sitter be merged), Stefan Monnier, 2022/11/19
- Re: Standardized access to a REPL,
Philip Kaludercic <=
- Re: Standardized access to a REPL, Stefan Monnier, 2022/11/19
- Re: Standardized access to a REPL, Philip Kaludercic, 2022/11/19
- Re: Standardized access to a REPL, Eli Zaretskii, 2022/11/19
- Re: Standardized access to a REPL, Stefan Monnier, 2022/11/19
- Re: Standardized access to a REPL, Philip Kaludercic, 2022/11/20
- Re: Suggesting that feature/tree-sitter be merged (was Re: Tree-sitter and major mode inheritance), Eli Zaretskii, 2022/11/19
- Re: Suggesting that feature/tree-sitter be merged (was Re: Tree-sitter and major mode inheritance), Philip Kaludercic, 2022/11/19
- Re: Suggesting that feature/tree-sitter be merged (was Re: Tree-sitter and major mode inheritance), Eli Zaretskii, 2022/11/19
- Re: Suggesting that feature/tree-sitter be merged (was Re: Tree-sitter and major mode inheritance), Philip Kaludercic, 2022/11/19
- Re: Suggesting that feature/tree-sitter be merged (was Re: Tree-sitter and major mode inheritance), Eli Zaretskii, 2022/11/19