Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If it works like Emacs paredit, the default for just hitting `(` would be

  let y = f()(2, 3)
but there should be a different command to do (`alt-(` in paredit)

  let y = f((2, 3))
There should of course also be "slurp" and "barf" commands to add or remove items from the parentheses if you do the wrong thing first (or want to wrap multiple things in the parentheses)


And also "boof" and "crap" commands for moving items in and out of the the other side of the parens.


I put the parenthesis one step further to the right - so you would get:

   let y = f(()2, 3)
Which possibly wouldn't parse.


That would depend on the language. Paredit is mainly made for Lisp where that would be legal (aside from the comma between 2 and 3). In some other languages that could also be allowed for casts.


(It possibly wouldn't parse in a language with C-style syntax.)




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: