Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!news-transit.tcx.org.uk!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python,': 0.01; 'languages,': 0.03; 'pretend': 0.07; 'received:verizon.net': 0.07; 'terry': 0.07; 'used.': 0.07; 'python': 0.08; 'buffer.': 0.09; 'expressions.': 0.09; 'necessary,': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:80.91.229.12': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'received:lo.gmane.org': 0.09; ';-)': 0.12; 'am,': 0.12; 'entries': 0.15; 'buffer)': 0.16; 'emacs,': 0.16; 'lisp': 0.16; 'parentheses': 0.16; 'position)': 0.16; 'reedy': 0.16; 'ring,': 0.16; 'language': 0.17; 'wrote:': 0.18; 'subject:Questions': 0.18; 'jan': 0.19; '(or': 0.22; 'header:In-Reply-To:1': 0.22; 'saying': 0.26; 'mainly': 0.28; 'do.': 0.28; '(and': 0.28; 'lee': 0.28; 'accessible': 0.29; 'buffer,': 0.30; 'least': 0.30; 'functional': 0.31; 'does': 0.32; 'header:User-Agent:1': 0.33; 'header:X -Complaints-To:1': 0.33; 'to:addr:python-list': 0.34; 'community': 0.34; 'jump': 0.34; 'typical': 0.34; '(not': 0.35; 'switch': 0.35; 'especially': 0.35; 'but': 0.37; 'received:org': 0.38; 'some': 0.38; 'primary': 0.38; 'unlike': 0.39; 'should': 0.39; 'extend': 0.39; 'plain': 0.39; 'mark': 0.39; "it's": 0.40; 'to:addr:python.org': 0.40; 'more': 0.61; 'full': 0.62; 'love': 0.62; 'respect,': 0.67; 'ring': 0.77; '(defun': 0.84; '(while': 0.84; 'andrea': 0.84; 'widen': 0.84; 'xah': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Terry Reedy Subject: Re: Questions about LISP and Python. Date: Wed, 07 Dec 2011 06:17:51 -0500 References: <6b56c68d-22ed-427d-a05e-c503e9990a20@r28g2000yqj.googlegroups.com> <3847f890-210a-4695-b37c-b82103fd20d7@v5g2000yqn.googlegroups.com> <4EDF3C91.3000605@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: pool-74-109-121-73.phlapa.fios.verizon.net User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0 In-Reply-To: <4EDF3C91.3000605@gmail.com> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 55 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1323256705 news.xs4all.nl 6918 [2001:888:2000:d::a6]:44823 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:16778 On 12/7/2011 5:14 AM, Andrea Crotti wrote: > On 12/06/2011 04:36 AM, Xah Lee wrote: >> i don't like python, and i prefer emacs lisp. The primary reason is >> that python is not functional, especially with python 3. The python >> community is full of fanatics with their drivels. In that respect, >> it's not unlike Common Lisp community and Scheme lisp community. >> > > I love emacs and I love python, but saying that elisp is a better language > than python and more functional is plain ridiculous. > Elisp is great to extend Emacs, but with dynamic scoping and side effects > used everywhere should not even be considered between the functional > languages, at least for how it's mainly used. > > This is a typical usage taken from simple.el > (defun pop-global-mark () > "Pop off global mark ring and jump to the top location." > (interactive) > ;; Pop entries which refer to non-existent buffers. > (while (and global-mark-ring (not (marker-buffer (car global-mark-ring)))) > (setq global-mark-ring (cdr global-mark-ring))) > (or global-mark-ring > (error "No global mark set")) > (let* ((marker (car global-mark-ring)) > (buffer (marker-buffer marker)) > (position (marker-position marker))) > (setq global-mark-ring (nconc (cdr global-mark-ring) > (list (car global-mark-ring)))) > (set-buffer buffer) > (or (and (>= position (point-min)) > (<= position (point-max))) > (if widen-automatically > (widen) > (error "Global mark position is outside accessible part of buffer"))) > (goto-char position) > (switch-to-buffer buffer))) > > Which means more or elss pop a mark from the mark ring, get the current > buffer/position, > then set the buffer, widen if necessary, go to some position and switch > to that buffer. > > Nothing wrong with it, but basically it messes around with global state, > as most elisp functions > do. > > And how python 3 would be less functional? It does not pretend that surrounding statements with parentheses turns them into expressions. ;-) -- Terry Jan Reedy