[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ELPA submission: drepl (REPL protocol)
From: |
Augusto Stoffel |
Subject: |
Re: ELPA submission: drepl (REPL protocol) |
Date: |
Wed, 01 Nov 2023 19:28:57 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
On Tue, 31 Oct 2023 at 09:08, Philip Kaludercic wrote:
> The idea seems interesting, I'll have to try it out at some point
> (though I don't really use Python or Lua much, so I hope you plan to add
> more languages in the future).
Sure, let me know if you have any ideas. A good candidate, as I
mention in the readme, would be a language that has a good embeddable
REPL library that you hack into (as opposed to a program where the
REP-loop is more or less hardcoded).
> Code-wise, I just have a few minor comments:
> -(defface drepl-prompt-invalid '((t :inherit (error default)))
> +(defface drepl-prompt-invalid '((t :inherit (error default))) ;why both?
> "Face for continuation prompts when input is invalid.")
This is really needed to avoid comint-highlight-input from interfering
in continuation prompts.
> +;; Are classes needed here or could you use `cl-defstruct' with
> +;; `:include'?
> (defclass drepl-base ()
> ((buffer :initarg :buffer :reader drepl--buffer)
> (status :initform nil :accessor drepl--status)
I would use a more lightweight alternative to EIEIO if available, but
cl-defstructs don't form a hierarchy for method dispatch purposes. (Not
that I'm using this feature _right now_, but morally it's the right
thing.)
> (cl-defgeneric drepl--command (repl)
> "The command to start the REPL interpreter as a list of strings."
> (ignore repl)
> - (error "This needs an implementation"))
> + (error "This needs an implementation")) ;Mention what "this" is
_This_ is the method. This is one of the two things that cannot have a
default implementation and should be implemented by every subclass :-).
Is the message confusing?
- Re: ELPA submission: drepl (REPL protocol),
Augusto Stoffel <=