all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: phillip.lord@newcastle.ac.uk (Phillip Lord)
To: "Kai Großjohann" <kai.grossjohann@gmx.net>
Cc: help-gnu-emacs@gnu.org
Subject: Re: DynamicBindingVsLexicalBinding
Date: Tue, 15 Oct 2013 12:27:12 +0100	[thread overview]
Message-ID: <87ppr6oju7.fsf@zerg32.ncl.ac.uk> (raw)
In-Reply-To: <525C62D9.8070702@gmx.net> ("Kai \=\?utf-8\?Q\?Gro\=C3\=9Fjohann\=22\?\= \=\?utf-8\?Q\?'s\?\= message of "Mon, 14 Oct 2013 23:32:09 +0200")

Kai Großjohann <kai.grossjohann@gmx.net> writes:
> Here is a nice and straightforward application of dynamic binding (if I
> do say so myself).
>
> (defun perldoc ()
>   (interactive)
>   (require 'man)
>   (let ((manual-program "perldoc"))
>     (call-interactively 'man)))

It is a nice example, and I've done something similar myself (on
smtpauth, and w3 if I remember).


> Of course a REAL developer would provide a manual reader class with
> configurable manual reader class factories, and then use a dependency
> injection container to implement a configurable manual reader class
> factory factory.  And because convention over configuration is a good
> thing, we'll say that the ManManualReaderFactory creates "man" manual
> readers whereas the PerldocManualReaderFactory creates "perldoc" manual
> readers.  So you can write a manual reader factory factory generator
> that just generates an empty subclass of the
> AbstractManualReaderFactoryBase at runtime.  Yeah.  That would be great.
>  You would even only need a few hundred lines of code to do it.  And the
> Spring dependency injection container to go with it is only a couple MB.
>  What's not to like about this?  What?  The Emacs Lisp solution is only
> five lines of code you say?  How can this _possibly_ provide the same
> functionality that we've got with our awesome enterprisey framework?
> Hm?  Dynamic binding?  You must be kidding!


Like this class which is a bit of a classic.

http://docs.spring.io/spring/docs/2.5.x/api/org/springframework/aop/framework/AbstractSingletonProxyFactoryBean.html

and has been described as everything wrong with Java in a single class.


None the less, I think you are hitting a strawman here; if Emacs went
entirely lexically bound, I don't think that it necessarily follows that
elisp will turn into Java.

Phil



  reply	other threads:[~2013-10-15 11:27 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-12 17:56 DynamicBindingVsLexicalBinding Andreas Röhler
2013-10-12 18:35 ` DynamicBindingVsLexicalBinding Dmitry Gutov
2013-10-12 20:53   ` DynamicBindingVsLexicalBinding Drew Adams
2013-10-13  5:09     ` DynamicBindingVsLexicalBinding Thien-Thi Nguyen
2013-10-13  7:54   ` DynamicBindingVsLexicalBinding Andreas Röhler
2013-10-13 13:46     ` DynamicBindingVsLexicalBinding Kai Großjohann
2013-10-13 16:21       ` DynamicBindingVsLexicalBinding Drew Adams
2013-10-14 11:21         ` DynamicBindingVsLexicalBinding Phillip Lord
2013-10-14 13:45           ` DynamicBindingVsLexicalBinding Drew Adams
2013-10-14 16:05             ` DynamicBindingVsLexicalBinding Phillip Lord
2013-10-14 21:32           ` DynamicBindingVsLexicalBinding Kai Großjohann
2013-10-15 11:27             ` Phillip Lord [this message]
2013-10-15 20:43               ` DynamicBindingVsLexicalBinding Kai Großjohann
2013-10-16 12:57                 ` DynamicBindingVsLexicalBinding Phillip Lord
     [not found]                 ` <mailman.4127.1381928277.10748.help-gnu-emacs@gnu.org>
2013-10-16 14:26                   ` DynamicBindingVsLexicalBinding Barry Margolin
     [not found]       ` <mailman.3929.1381681317.10748.help-gnu-emacs@gnu.org>
2013-10-14 11:27         ` DynamicBindingVsLexicalBinding Rustom Mody
2013-10-14 11:15 ` DynamicBindingVsLexicalBinding Phillip Lord
     [not found] <mailman.3891.1381600459.10748.help-gnu-emacs@gnu.org>
2013-10-13  3:34 ` DynamicBindingVsLexicalBinding Barry Margolin

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=87ppr6oju7.fsf@zerg32.ncl.ac.uk \
    --to=phillip.lord@newcastle.ac.uk \
    --cc=help-gnu-emacs@gnu.org \
    --cc=kai.grossjohann@gmx.net \
    /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.