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

I think "structural editing" is a better way to talk about it. You manipulate code as units of S-expressions. You don't type parentheses so much as you create and modify (trees of) S-expressions. So things like unbalanced parentheses or improperly indented forms are not possible since there's no way to create them in the first place.

In a somewhat vague sense, the "units of editing" are not characters.

There are some videos on YouTube demonstrating ParEdit and SLIME.



That’s fine, but I don’t see where one gets "light years ahead of any programming IDE out there" from that.

I like Lisps/Schemes as much as the next person, but other languages don’t have parentheses to deal with, so by that same token, you’re getting that for free, such as an ML like F#.


There isn’t a single language IDE that I know of outside of Lisp that allows you to hoist a sub block of a loop (a sub tree in the AST) and remove the parent of that code and paste the hoisted expression while simultaneously removing the loop construction with a single key. Please show me an IDE like that and I will buy it immediately. Paredit is not about parenthesis editing and matching despite its name.


Okay, but my original question remains.


with lisp structural edditing you are editing blocks of code, as opposed to characters. in fact it is the use of s-expressions that makes this possible. here is a simple example. immagine you have a list, two elements just outside it, and your cursor is just after the second element:

  Python: [x,y,z] 1,2
  Lisp: '(x y z) 1 2
and lets say you want everything in the list st

  Python: [x,y,z,1,2]
  Lisp: '(x y z 1 2)
in python it would take me about 5 keystrokes to achieve that, while with paredit in lisp it takes 2. this is just a very simple example of the most basic paredit operation. extending this approach to your whole source file and treating whole blocks of code similarly to the above examlle i find really handy




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

Search: