Re: [O] Elisp programming style

2011-10-29 Thread Thorsten
Tom Prince tom.pri...@ualberta.net writes: Perhaps ,--- | (defun main-function (args) | (let ((var (assoc :key1 args))) ; extracting var once | ...

Re: [O] Elisp programming style

2011-10-28 Thread Štěpán Němec
On Thu, 27 Oct 2011 20:03:22 +0200 Thorsten wrote: Hi List, doing some Elisp programming (in an orgmode context) recently, the following question with regards to the 'accepted programming style' for Elisp concerned me: How independent and self-sustained should helper functions be? I

Re: [O] Elisp programming style

2011-10-28 Thread Thorsten
Štěpán Němec step...@gmail.com writes: On Thu, 27 Oct 2011 20:03:22 +0200 Thorsten wrote: Hi List, doing some Elisp programming (in an orgmode context) recently, the following question with regards to the 'accepted programming style' for Elisp concerned me: How independent and

Re: [O] Elisp programming style

2011-10-28 Thread Nick Dokos
Thorsten quintf...@googlemail.com wrote: Štěpán Němec step...@gmail.com writes: On Thu, 27 Oct 2011 20:03:22 +0200 Thorsten wrote: Hi List, doing some Elisp programming (in an orgmode context) recently, the following question with regards to the 'accepted programming style' for

Re: [O] Elisp programming style

2011-10-28 Thread Tassilo Horn
Thorsten quintf...@googlemail.com writes: Too bad you didn't give any concrete examples. The problem can be described easily: problem-specific helper-funcions (some redundancy avoided) ,--- | (defun main-function (args)

Re: [O] Elisp programming style

2011-10-28 Thread Eric Schulte
The problem can be described easily: problem-specific helper-funcions (some redundancy avoided) ,--- | (defun main-function (args) | (let ((var (assoc :key1 args))) ; extracting var once | ...

Re: [O] Elisp programming style

2011-10-28 Thread Eric Schulte
Tassilo Horn tass...@member.fsf.org writes: Thorsten quintf...@googlemail.com writes: Too bad you didn't give any concrete examples. The problem can be described easily: problem-specific helper-funcions (some redundancy avoided)

Re: [O] Elisp programming style

2011-10-28 Thread Thorsten
Eric Schulte schulte.e...@gmail.com writes: Hi Eric, Hmmm, this looks suspiciously like the case in some Babel functions :) well ... ;) in which we originally has instances of the first style and then had to manually transition to the second. IMO the first is very poor form, the

Re: [O] Elisp programming style

2011-10-28 Thread Thorsten
Nick Dokos nicholas.do...@hp.com writes: Not a problem - you can't predict the future. You do the best you can with your current knowledge. You can always refactor in the future: that's one reason that having the source code around is important. When you refactor, you may be cursing the

Re: [O] Elisp programming style

2011-10-28 Thread Tom Prince
Perhaps ,--- | (defun main-function (args) | (let ((var (assoc :key1 args))) ; extracting var once | ... | (helper-function1 ... var ...) ; inside

Re: [O] Elisp programming style

2011-10-28 Thread Eric Abrahamsen
[...] Would that be considered bad style from the original author, or is that up to personal choice and not considered a problem? Not a problem - you can't predict the future. You do the best you can with your current knowledge. You can always refactor in the future: that's one reason

[O] Elisp programming style

2011-10-27 Thread Thorsten
Hi List, doing some Elisp programming (in an orgmode context) recently, the following question with regards to the 'accepted programming style' for Elisp concerned me: How independent and self-sustained should helper functions be? I found some redundancy in elisp code, e.g. several (main and