From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: Is there a way to instrument for edebug a form (say, a progn) given to `eval'? Date: Sat, 02 Jan 2016 12:39:47 -0500 Message-ID: References: <87k2nw866r.fsf@mbork.pl> <87twmxv2ad.fsf@gmail.com> <87lh89uw87.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1451756423 9322 80.91.229.3 (2 Jan 2016 17:40:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 2 Jan 2016 17:40:23 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jan 02 18:40:15 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aFQA3-0002c5-99 for geh-help-gnu-emacs@m.gmane.org; Sat, 02 Jan 2016 18:40:15 +0100 Original-Received: from localhost ([::1]:39157 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aFQA2-0007h5-Cg for geh-help-gnu-emacs@m.gmane.org; Sat, 02 Jan 2016 12:40:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37446) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aFQ9r-0007gy-Hy for help-gnu-emacs@gnu.org; Sat, 02 Jan 2016 12:40:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aFQ9o-00070A-Av for help-gnu-emacs@gnu.org; Sat, 02 Jan 2016 12:40:03 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:42056) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aFQ9o-0006zw-3R for help-gnu-emacs@gnu.org; Sat, 02 Jan 2016 12:40:00 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1aFQ9l-0002KT-PW for help-gnu-emacs@gnu.org; Sat, 02 Jan 2016 18:39:58 +0100 Original-Received: from 198-230-235-201.fibertel.com.ar ([201.235.230.198]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 02 Jan 2016 18:39:57 +0100 Original-Received: from monnier by 198-230-235-201.fibertel.com.ar with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 02 Jan 2016 18:39:57 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 19 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 198-230-235-201.fibertel.com.ar User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) Cancel-Lock: sha1:P4vm5+yNU9HY+g9OiuzbVNVQxJg= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:108577 Archived-At: > "[...] a program that uses eval. It can't be compiled and optimized as well > as the earlier paragraph, and the language context in which it is run > may change the result." The reason why it can't be compiled/optimized is that it's very difficult to analyze/understand precisely what can happen. And this difficulty doesn't only apply to automated tools like compilers/optimizers but also to humans. Basically, when execution gets to "eval" *anything* can happen. So modifying code that uses "eval" without affecting its behavior is terribly difficult. So it makes for code that's difficult to maintain. There are cases where "eval" is just what you need, of course, but you should keep in mind that it's too powerful to use it in cases where something else would work as well. Stefan