From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Rustom Mody Newsgroups: gmane.emacs.help Subject: Re: Fire defun by typing keyword Date: Tue, 5 Nov 2013 19:37:11 -0800 (PST) Message-ID: References: <871u33mqj0.fsf@nl106-137-194.student.uu.se> <87zjpjmuhj.fsf@nl106-137-194.student.uu.se> <87k3gmbhjk.fsf@nl106-137-194.student.uu.se> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1383709215 13607 80.91.229.3 (6 Nov 2013 03:40:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 6 Nov 2013 03:40:15 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Nov 06 04:40:21 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Vdtyb-0008IQ-Ie for geh-help-gnu-emacs@m.gmane.org; Wed, 06 Nov 2013 04:40:17 +0100 Original-Received: from localhost ([::1]:59701 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vdtyb-0007ol-4r for geh-help-gnu-emacs@m.gmane.org; Tue, 05 Nov 2013 22:40:17 -0500 X-Received: by 10.50.17.101 with SMTP id n5mr8764062igd.2.1383709032496; Tue, 05 Nov 2013 19:37:12 -0800 (PST) X-Received: by 10.182.204.9 with SMTP id ku9mr385obc.10.1383709032277; Tue, 05 Nov 2013 19:37:12 -0800 (PST) Original-Path: usenet.stanford.edu!o2no21410264qas.0!news-out.google.com!9ni12787qaf.0!nntp.google.com!o2no21410263qas.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help In-Reply-To: <87k3gmbhjk.fsf@nl106-137-194.student.uu.se> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=59.95.12.150; posting-account=mBpa7woAAAAGLEWUUKpmbxm-Quu5D8ui Original-NNTP-Posting-Host: 59.95.12.150 User-Agent: G2/1.0 Injection-Date: Wed, 06 Nov 2013 03:37:12 +0000 Original-Xref: usenet.stanford.edu gnu.emacs.help:202089 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:94360 Archived-At: On Wednesday, November 6, 2013 4:08:14 AM UTC+5:30, Emanuel Berg wrote: > Kai Gro=DFjohann writes: > > for (int i=3D0; i<10; i++) { > > _ > > } > > You could create an abbrev that reads a type (int), a > > variable (i), an initial value (0), a final value > > (10), and then produces the above, where _ indicates > > the position of the cursor. > Wow! I actually had that exact same thought a couple of > years ago: > http://unix.stackexchange.com/questions/71599 > Back then I thought there was basically no thinking at > all to programming, it was just a matter of finger > habits, eye-hand coordination, eye-brain interpretation > (as opposed to the crude "reading"), etc., all physical > in one way or another. Typing and everything should be > so fast so it could "keep up" with the thinking (which > was trivial in a pleasant, not boring, sense). > While I still think this aspect is grossly overlooked, I > don't think it is "all about that" anymore. I certainly > have the time to write a for loop now and then without > my mind beaming away in some other direction, hopelessly > lost forever after. > But it is an amazing thought - imagine to have an entire > programming language coded anew like that, with every > construct just a short abbrev away. It would make for > "parametric" programming if there ever was one. Well APL was conceived on that basis: every important/core concept was a keystroke away. And Iverson won the Turing award for that: http://www.jdl.ac.cn/turing/pdf/p444-iverson.pdf Modernized version Warning dizziness ahead: http://aplwiki.com/FinnAplIdiomLibrary