[racket-dev] [racket] Survey for DrRacket users related to automatic parentheses behavior
8 hours ago, Nadeem Abdul Hamid wrote:
> The idea is to have DrRacket automatically skip over
> automatically-inserted closing parens if the user types one while
> the cursor is right in front of one. (The Eclipse Java IDE does this
> with various types of braces and parens, and in the past I've found
> this very nice and have observed others (my students) interact well
> with such a feature.)
IMO, inserting a closing paren (of any shape, including quotes) must
come with such a feature, but what you describe is only to let you get
used to the idea. I'd prefer that in the auto-insert-closing-paren-
mode, typing a closing paren jumps over the existing one even if the
cursor is not in front of one. IOW, in this mode, I'd like it if "("
and ")" behave like "M-(" and "M-)" in Emacs (IIRC, drr doesn't do the
last one).
I'd also extend it with more paredit-like things, like backspacing or
deleting a paren. (I don't actually use paredit, but for the sake of
being what some people are used to, I'd vote for whatever it is
doing.) That's probably the only other extension that is needed to
make this mode into a proper "you're pretty much always balanced"
thing.
And BTW, since the bg check syntax thing was mentioned: I think that
it is a very good reason to have this feature, since it makes a huge
improvement in having it run into read errors much less. (Personally,
on both drr and emacs, I've completely adapted to always using the
meta with an open paren, and IME it's one thing that helps students a
lot yet they seldom know about it or remember to use it. I'm so used
to it, that if I happen to type or see a single "(" I have a mental
alarm go off.)
Having said that:
> 1. Do you use the automatic parentheses feature of DrRacket?
No, I'm used to always M-ing my parens. (In both editors.) Having a
proper drr thing might actually make me change it, given that there is
an Emacs thing that I can use too.
> 2a. If yes, does the proposal above resonate well with you?
> 2b. And, do you think this "smart skipping" of auto-inserted closing
> parentheses should become the intrinsic behavior of the automatic
> parentheses mode, or should it be a separate preference? (i.e. have
> two preference options - the current automatic parentheses one and
> then a subordinate option that enables/disables this skipping over
> of auto-inserted closing parentheses as the user types them)
I have a strong opinion about this, even without using it... I think
that it shouldn't be a separate option. In this mode the "(" key is
already useless for just inserting a single paren, so there's no
reason that ")" will be different.
> 3. If your answer to #1 is "No", why not? (Is it because you find
> its current behavior awkward in some way?)
(Explained above.)
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://barzilay.org/ Maze is Life!