all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Emanuel Berg <embe8573@student.uu.se>
To: help-gnu-emacs@gnu.org
Subject: the #'function type-in-code issue, (E)lisp, and C
Date: Sun, 04 Oct 2015 02:56:24 +0200	[thread overview]
Message-ID: <87si5rtps7.fsf@debian.uxu> (raw)

Remember the discussion that a #'function should be
put like that, sharp quoted?

I have now changed all of my code. The conclusions
are:

1) This made me `require' a lot of stuff that was
previously not required. This meant some pleasant
work, but did it also make the code more robust? - an
open question...

2) Sometimes it was difficult to know how to put it.
Here, the help came in handy. Here are two examples:

       (put SYMBOL PROPNAME VALUE)

       Store SYMBOL's PROPNAME property with
value VALUE.

   so

       (put 'upcase-region 'disabled nil)

   but

       (add-hook HOOK FUNCTION &optional APPEND LOCAL)

       Add to the value of HOOK the function FUNCTION.

   and consequently

       (add-hook 'text-mode-hook #'text-mode-hook-f)

Now, the help came in "handy", but if you compare it
to the languages that do use types in the code all the
time, and are not ashamed to do so, we see that in
those languages there is never such detective work
required, at all!

For example, the language C. Do:

    M-x printf(3) RET

and see that the first thing they tell you is

    SYNOPSIS #include <stdio.h>

       int printf(const char *format, ...); int
fprintf(FILE *stream, const char *format, ...); int
sprintf(char *str, const char *format, ...); int
snprintf(char *str, size_t size, const char *format,
...);

i.e., the types!

So here what I can see (E)lisp is at a clear
disadvantage as it is not only unclear what to do,
even when you decide what to do, if you decide to do
the function/symbol distinction, it is not clear how
to do it!

-- 
underground experts united
http://user.it.uu.se/~embe8573




                 reply	other threads:[~2015-10-04  0:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=87si5rtps7.fsf@debian.uxu \
    --to=embe8573@student.uu.se \
    --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.