all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Swami Tota Ram Shankar <tota_ram@india.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Style Issues in Lisp and Scheme programming, setq versus let ... and onion structure with multiple cores or eyes or kernels Re: string to list or string to array
Date: Mon, 22 Oct 2012 20:02:00 -0700 (PDT)	[thread overview]
Message-ID: <492ccf3f-9658-4446-913e-3d0600011702@y8g2000yqy.googlegroups.com> (raw)
In-Reply-To: mailman.11503.1350959781.855.help-gnu-emacs@gnu.org

On Oct 22, 7:36 pm, PJ Weisberg <p...@irregularexpressions.net> wrote:
> On Mon, Oct 22, 2012 at 6:16 PM, Swami Tota Ram Shankar
>
> <tota_...@india.com> wrote:
> > For example, the imperative programming style, flows nicely from top
> > to bottom. The eye has to move L->R and top to bottom to understand
> > the screenful module, as in C.
>
> > I have found that let, and functional style leads to an onion type
> > structure.
>
> > f(g(h(x,y),z,k(alpha,beta,l(theta)))w)
>
> That could be valid C code, but it's probably not Lisp code, unless
> you really do have a function named "x,y".
>
> > If it is short, its not an issue, but the multiple cores or eyes of
> > the onion, makes it impossible to grasp the structure.
>
> Just one small tip: when reading lisp code, pay more attention to the
> indentation then to the parentheses.  Of course the
> compiler/interpreter doesn't pay attention to the indentation, but the
> author probably did.
>

Can you suggest some skeleton

(defun function (var1 var2 var3)
""
(interactive "swith strings and \ns to allow suggested defaults and
avoid typing and simply RTN")

  taking care of defaults if null or ""

  (let* (()()())



   )

)


btw, lisp's prefix notation, (f x y z) is more expressive and
convenient for expressing currying (((f x) y) z) than f(x y z).

I expect incisive and penetrating analysis of code organization and
using that to improve readability.




  parent reply	other threads:[~2012-10-23  3:02 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-21 10:37 string to list or string to array Swami Tota Ram Shankar
2012-10-21 11:16 ` Pascal J. Bourguignon
2012-10-21 19:03   ` Swami Tota Ram Shankar
2012-10-21 20:22     ` Pascal J. Bourguignon
2012-10-23  1:16       ` Style Issues in Lisp and Scheme programming, setq versus let ... and onion structure with multiple cores or eyes or kernels " Swami Tota Ram Shankar
2012-10-23  2:36         ` PJ Weisberg
     [not found]         ` <mailman.11503.1350959781.855.help-gnu-emacs@gnu.org>
2012-10-23  3:02           ` Swami Tota Ram Shankar [this message]
2012-10-24 15:03             ` Stefan Monnier
2012-10-25  3:20               ` gnuist007
2012-10-25  8:25                 ` José A. Romero L.
2012-11-21 21:56                 ` Pascal J. Bourguignon
2012-10-23  8:15         ` Pascal J. Bourguignon
2012-10-24  8:05         ` Thien-Thi Nguyen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=492ccf3f-9658-4446-913e-3d0600011702@y8g2000yqy.googlegroups.com \
    --to=tota_ram@india.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.