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: Re: dynamic and lexical scope, attempted summary with example
Date: Tue, 22 Jul 2014 00:11:46 +0200	[thread overview]
Message-ID: <8761iqcqfx.fsf@debian.uxu> (raw)
In-Reply-To: mailman.5826.1405962249.1147.help-gnu-emacs@gnu.org

Thien-Thi Nguyen <ttn@gnu.org> writes:

> I would make sure A and B are always strings and use
> ‘concat’.  For filenames, i would use
> ‘(expand-file-name B A)’.

Do you suggest this because "you should always verify
the input"? With `stringp', in this case?

If you verify all inputs as a matter of principle I
guess `file-exists-p' should be put somewhere as well?

And: `expand-file-name' - because it is more
portable/safe, replacing tilde with the literal
/home/user/ and possibly other housekeeping?

Well, all those considerations aren't really an issue
as the only person using this will be yours truly and
all possible bugs will be found instantly (and without
harm) and corrected. `expand-file-name' I'll use as a
matter of principle but verifying indata, for all
zillion defuns it would be lots of work for catching
accidental maluse of the software - does that usually
pay off? In my experience, I don't think so.

> If i answer "no", then both of us may be fooling
> ourselves, but in a safe way.  If i answer "yes",
> then there is only one fool (me), but the foolishness
> i am capable of is huge.
>
> The result of the _insertion_ of literal values at
> the places of the parameters, will result in a
> function that don't use variables (dynamic or
> lexical) but _hard-coded_ values - that issue is
> _eliminated_.
>
> Do you think it is correct in terms of technology?
>
> Mu!  (See above.)  Actually, i'd add "places" and
> "will result" to my list of confusions.

I know you understand because you have read the code
which you understand instantly. Of course English
cannot describe the code perfectly, but I bet it didn't
add to your confusion. If you know a better way to
describe it do tell.

-- 
underground experts united


  parent reply	other threads:[~2014-07-21 22:11 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-15 13:47 run-with-timer does not display message Matthias Pfeifer
2014-07-15 13:53 ` Thorsten Jolitz
2014-07-18 16:26   ` Stefan Monnier
     [not found]   ` <mailman.5631.1405701027.1147.help-gnu-emacs@gnu.org>
2014-07-18 21:34     ` Emanuel Berg
2014-07-19 15:09       ` Sebastian Wiesner
2014-07-19 15:27         ` Eli Zaretskii
2014-07-19 17:08           ` Stefan Monnier
2014-07-19 18:04             ` Drew Adams
     [not found]           ` <mailman.5702.1405789759.1147.help-gnu-emacs@gnu.org>
2014-07-19 17:43             ` Emanuel Berg
2014-07-19 18:12               ` Stefan Monnier
2014-07-19 20:06                 ` Lexical and Dynamic Scope Robert Thorpe
2014-07-20 12:15               ` run-with-timer does not display message Sebastian Wiesner
2014-07-21 13:26                 ` Stefan Monnier
     [not found]               ` <mailman.5708.1405793578.1147.help-gnu-emacs@gnu.org>
2014-07-20 19:27                 ` Emanuel Berg
2014-07-21 13:29                   ` Stefan Monnier
     [not found]                   ` <mailman.5813.1405950328.1147.help-gnu-emacs@gnu.org>
2014-07-21 22:17                     ` Emanuel Berg
2014-07-24  8:25                       ` Stefan Monnier
     [not found]               ` <mailman.5754.1405858540.1147.help-gnu-emacs@gnu.org>
2014-07-20 19:37                 ` Emanuel Berg
2014-07-20 20:11                   ` Drew Adams
2014-07-20 21:28                 ` dynamic and lexical scope, attempted summary with example (was: Re: run-with-timer does not display message) Emanuel Berg
2014-07-21  4:44                   ` dynamic and lexical scope, attempted summary with example Thien-Thi Nguyen
2014-07-21  6:36                     ` Thorsten Jolitz
     [not found]                     ` <mailman.5796.1405924598.1147.help-gnu-emacs@gnu.org>
2014-07-21 14:08                       ` Emanuel Berg
2014-07-21  9:23                   ` Michael Heerdegen
     [not found]                   ` <mailman.5792.1405917701.1147.help-gnu-emacs@gnu.org>
2014-07-21 13:36                     ` Emanuel Berg
2014-07-21 17:07                       ` Thien-Thi Nguyen
     [not found]                       ` <mailman.5826.1405962249.1147.help-gnu-emacs@gnu.org>
2014-07-21 22:11                         ` Emanuel Berg [this message]
     [not found]                   ` <mailman.5805.1405934637.1147.help-gnu-emacs@gnu.org>
2014-07-21 14:02                     ` Emanuel Berg
     [not found]       ` <mailman.5686.1405782584.1147.help-gnu-emacs@gnu.org>
2014-07-19 17:49         ` run-with-timer does not display message Emanuel Berg
     [not found] ` <mailman.5455.1405432451.1147.help-gnu-emacs@gnu.org>
2014-07-15 15:35   ` Emanuel Berg

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=8761iqcqfx.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.