From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?utf-8?Q?=C3=93scar_Fuentes?= Newsgroups: gmane.emacs.help Subject: Re: Check for redundancy Date: Thu, 25 Jun 2015 04:53:28 +0200 Message-ID: <87616cqz13.fsf@wanadoo.es> References: <558A7875.4050905@easy-emacs.de> <24a1b328-82a8-44ff-8f8d-1425ab89ab67@default> <87a8vor1co.fsf@wanadoo.es> <871th0ilr7.fsf@nl106-137-147.student.uu.se> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1435200848 8032 80.91.229.3 (25 Jun 2015 02:54:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 25 Jun 2015 02:54:08 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jun 25 04:53:55 2015 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 1Z7xIY-0006hx-Le for geh-help-gnu-emacs@m.gmane.org; Thu, 25 Jun 2015 04:53:54 +0200 Original-Received: from localhost ([::1]:53687 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7xIY-0006Eh-06 for geh-help-gnu-emacs@m.gmane.org; Wed, 24 Jun 2015 22:53:54 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51996) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7xIN-0006EQ-KN for help-gnu-emacs@gnu.org; Wed, 24 Jun 2015 22:53:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z7xII-0001LE-Am for help-gnu-emacs@gnu.org; Wed, 24 Jun 2015 22:53:43 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:45141) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7xII-0001Kx-4I for help-gnu-emacs@gnu.org; Wed, 24 Jun 2015 22:53:38 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Z7xIE-0006Qw-Dk for help-gnu-emacs@gnu.org; Thu, 25 Jun 2015 04:53:34 +0200 Original-Received: from 100.red-81-44-116.dynamicip.rima-tde.net ([81.44.116.100]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 25 Jun 2015 04:53:34 +0200 Original-Received: from ofv by 100.red-81-44-116.dynamicip.rima-tde.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 25 Jun 2015 04:53:34 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 21 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 100.red-81-44-116.dynamicip.rima-tde.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) Cancel-Lock: sha1:jdyLWz/LZ5kPYdBy7H3Tzp8tirg= 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:105140 Archived-At: Emanuel Berg writes: > Óscar Fuentes writes: > >> A pretty easy (and safe) way is to define redundancy >> as "functional equivalence" (which is what the OP >> mean, I think) and then compare the >> generated bytecode. > > Have ten programmers solve the same problem, then > compile - do you now have ten instances of identical > bytecode? I don't think so. See all those tiny helper functions defined in every package. They do the same and I guess that they are implemented the same way. An informative note from the byte compiler saying that foo-remove-string-prefix has an equivalent available on the current version of Emacs would be appreaciated. Solving the general problem is much harder, obviously, but I think that the OP knows that.