Question about parentheses
Question about parentheses
I've just started learning lisp(bought all the little schemer books to get me going) I love the language alot, it really opens your mind about the possibilities and abstract thinking of computers. There's was just a question that's been on my mind for a while since starting. Why all the parentheses?
I mean I know what they're for but why no brackets? It seems like a symbol that would be used that much shouldn't be a two key combo. Seems like a road to carpel tunnel lol. Would it be simple to just modify a compiler of interpreter to read brackets instead of parentheses?
Else is there a faster way to type parentheses, like a way to turn off numbers for a sec or something.
I mean I know what they're for but why no brackets? It seems like a symbol that would be used that much shouldn't be a two key combo. Seems like a road to carpel tunnel lol. Would it be simple to just modify a compiler of interpreter to read brackets instead of parentheses?
Else is there a faster way to type parentheses, like a way to turn off numbers for a sec or something.
Re: Question about parentheses
Well, if you look at the Space Cadet keyboards, which were used in many Lisp Machines, parentheses were where the square brackets are on most current keyboards.
Modifying the keyboard layout is fairly easy, at least on Linux. And it is even easier to redefine keys in Emacs, which is the best editor for Lisp editing. There is a Cliki page with some hints.
Modifying the keyboard layout is fairly easy, at least on Linux. And it is even easier to redefine keys in Emacs, which is the best editor for Lisp editing. There is a Cliki page with some hints.
-
- Posts: 61
- Joined: Mon Jul 07, 2008 8:06 pm
- Location: Toowoomba, Queensland, Australia
- Contact:
Brackets/Parentheses on Windows
Hey. I use Windows almost all of the time, and I was being driven mad too. I use AutoHotkey , and in my .ahk file, I have this:
The above code swaps brackets and parentheses, and always enters the corresponding closing character along with the opening one for each type (and repositions the caret between them). I've got a bit of other general stuff in the file to, if you're interested. Even lispier , I have replaced capslock with dash:
I originally had this:
but I found that I use '-' more (and there are other reasons).
Code: Select all
[::
Suspend On
SendInput (){left}
Suspend Off
Return
]::
Suspend On
SendInput )
Suspend Off
Return
(::
Suspend On
SendInput []{left}
Suspend Off
Return
)::
Suspend On
SendInput ]
Suspend Off
Return
+[::
Suspend On
SendInput +[+]{left}
Suspend Off
Return
Code: Select all
CapsLock::-
Code: Select all
CapsLock::Backspace
Backspace::CapsLock
-
- Posts: 148
- Joined: Wed Jul 30, 2008 11:26 pm
Re: Question about parentheses
Use paredit.el or something like it and you'll type half the parentheses.
Re: Question about parentheses
In Emacs you can (also)Switch the [] characters with ().
Re: Brackets/Parentheses on Windows
Driven mad? If you're using Windows, you must already be mad, no?Kohath wrote:Hey. I use Windows almost all of the time, and I was being driven mad too.
Re: Brackets/Parentheses on Windows
Oh, snap!Paul wrote:Driven mad? If you're using Windows, you must already be mad, no?Kohath wrote:Hey. I use Windows almost all of the time, and I was being driven mad too.
Re: Question about parentheses
I think a lisp forum is the last place you should be bashing someone for which tools they use
______
Parenthesis are there en-masse so that it's computer readable. As for being human readable they eventually fade away and you'll just read them similarly to how your read indentation in other languages.
______
Parenthesis are there en-masse so that it's computer readable. As for being human readable they eventually fade away and you'll just read them similarly to how your read indentation in other languages.
Re: Question about parentheses
Why? I could see saying that about a <choose-any-non-Lisp-language> forum...lithos wrote:I think a lisp forum is the last place you should be bashing someone for which tools they use
-
- Posts: 447
- Joined: Sat Jun 28, 2008 7:49 am
- Location: Austin, TX
- Contact:
Re: Question about parentheses
+1. Paredit rocks.Paul Donnelly wrote:Use paredit.el or something like it and you'll type half the parentheses.
Cheers, Dave
Slowly but surely the world is finding Lisp. http://www.findinglisp.com/blog/
Slowly but surely the world is finding Lisp. http://www.findinglisp.com/blog/