help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Should prefix variable be used in function argument list


From: Emanuel Berg
Subject: Re: Should prefix variable be used in function argument list
Date: Sun, 10 Jul 2022 06:14:52 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Philip Kaludercic wrote:

>> Check out the theory on MVC for why ...
>>
>> Check out the practice of annoying little Elisp pointers in
>> help mode for why ...
>
> I would appreciate it if you could explain what you are
> talking about instead of just insinuating points.

MVC = Model View Control.

Model is a word from OO theory, we would call it the program's
state or maybe internals, logic. Yeah, what it is and how that
works, basically.

View = What you see, i.e. the part of the interface that's
presented to you.

Control = the interface from the other side, from you as
a user

Not unlike the Lisp REPL where R (read) would be control,
E (eval) would be the logic acted upon the state, and
P (print) would be what the user sees from his or
her viewpoint.

So these three (MVC) should be separated, modules.

So translated to our case, and not in general but this
specifically, it becomes the control has not one control to do
something, it has two, one interactively and one
non-interactively, and you have to think in terms of the
program and Lisp environment, i.e. in the Model part of MVC
how that would work differently and so.

So you have Lisp in code, its makes up the model, but if the
user do M-: and types some Lisp, that is actually _not_ part
of the Model but is a part of, or an alternative interface.

If your practical reasons one has to have two functions, one
interactively and one non-interactively, what one can do is
having another function, e.g. (bob) and that would in turn do
either (goto-char (point-min)) or do it interactively if there
was some very special situation that called for that.
Such things can pe handled under the hood. But stuff that is
intuitive to the user, like that, one can have that
contra-intuitive and then hope that comments in the help
should remedy that.

>> Actually they are useful! So the annoyance should be
>> directed at the practice which they try to correct at
>> a later stage. That would be more fair.
>
> (Also, why do you always just respond to the list and don't
> CC the person you are responding too)

Often the sad truth is, they just can't handle the truth.

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

[Prev in Thread] Current Thread [Next in Thread]