From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.devel Subject: Re: Generators (iterators) for Gnu Emacs Date: Fri, 05 Dec 2014 10:34:24 -0500 Message-ID: <5481D080.7000206@dancol.org> References: <877fy77zhp.fsf@web.de> <87lhmm24x9.fsf@gmail.com> <54812545.6030008@dancol.org> <87d27y22lp.fsf@gmail.com> <87lhmmiim7.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="fpOoxkXNC2u1rLNqN9nj9w4dp7s19B8pf" X-Trace: ger.gmane.org 1417793714 1962 80.91.229.3 (5 Dec 2014 15:35:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 5 Dec 2014 15:35:14 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier , Leo Liu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 05 16:35:08 2014 Return-path: Envelope-to: ged-emacs-devel@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 1XwuuS-0004AU-8x for ged-emacs-devel@m.gmane.org; Fri, 05 Dec 2014 16:35:08 +0100 Original-Received: from localhost ([::1]:51005 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XwuuR-0007ei-Tk for ged-emacs-devel@m.gmane.org; Fri, 05 Dec 2014 10:35:07 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36426) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xwuty-0007YS-5v for emacs-devel@gnu.org; Fri, 05 Dec 2014 10:34:43 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xwutt-0001Sw-8z for emacs-devel@gnu.org; Fri, 05 Dec 2014 10:34:38 -0500 Original-Received: from dancol.org ([2600:3c01::f03c:91ff:fedf:adf3]:38445) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xwuts-0001So-VH for emacs-devel@gnu.org; Fri, 05 Dec 2014 10:34:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Type:In-Reply-To:References:Subject:CC:To:MIME-Version:From:Date:Message-ID; bh=CV3P2pp6sqEcVvTMthuuPecG6g0cmOTUVcA0rnBsMeA=; b=X4p6OP2a1dPpNBMX51NvezhVMDs8gGHGwXn6fY1J6+gMum/cVE4SNGH0ZFbfBfH3XwRAb9oGk1/bi8JKlkiPEMl04Ng0xvAvUtMXndLFo22kuIl5X7nsPS5+f4XdyuN47BMttNpN09uhr7CHbQjCWBzyWTKxFJP6LEBS7fZpT6weruZN7ZyGsPUtPjfGsZ2d4qH7IRtoAE51MXcrNDlXBsljOraALTEC1E9Eu3uun0e68bEhFhLD2l2vGPZ5s/H1DlemA547yFtmyGcg2rmbXwQtYhMv7nQe1zQqGFPoYw7olOX6zM/j/CIpuGQnS2cKOHRW2j20pQW7H/RRca4vFg==; Original-Received: from [64.20.179.190] (helo=[172.20.4.151]) by dancol.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84) (envelope-from ) id 1Xwutq-0004Ur-OG; Fri, 05 Dec 2014 07:34:30 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2600:3c01::f03c:91ff:fedf:adf3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:178939 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --fpOoxkXNC2u1rLNqN9nj9w4dp7s19B8pf Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 12/05/2014 09:48 AM, Stefan Monnier wrote: >> No. Daniel's package https://github.com/dcolascione/elisp-generators. = Do >> you have time to critique the code and make it an integral part of >> elisp? Thanks ;) >=20 > Oh, one more thing: is it technically important to sign the end by > signaling a `stop-iteration', rather than by returning a special value?= > I think I'd prefer returning a special value (`condition-case' tends to= > be on the costly side). I'd really rather signal to stop iteration. That way, it's harder to igno= re end-of-iteration and loop forever and it remains possible to iterate o= ver *any* value. condition-case is setjmp. I'm not *that* concerned by pe= rformance. The only other reasonable alternative is for iterators to yiel= d a cons (terminal-p . value), and consing is going to be much worse than= condition-case. --fpOoxkXNC2u1rLNqN9nj9w4dp7s19B8pf Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCAAGBQJUgdCAAAoJEN4WImmbpWBl3UoP/36EoDg8m0ztd0j9EVac/hQV oE2UQ+EsxqlK1ntnAgrFI/NOLykYDx132gjSvhXgrYsAaT8SWDh0gHyvPjSkb2a1 /ebTPvtgDlUoEvqrJWQlwdCauiQWNM6HPVkm7vh7aL5yHuAFqaOKBLHGhvaj40AH McSdOcZLdDLdkWtBJveGbdXdDfCw8AUkMrMpk/v82CFKp+RpAFYib4UEaTMRXEoh nZet+zGl7B80TKlPlEIo+VWF5hjAT6z4Khp7LocvFTlYOUgPN1ATztgvyPP6lYJw 8kFh6SrYdB6jUl8+/VVjYzRnvcPOUly/Z3ubPGGVmdQp9CIVlIaIZd1b1d0snMZn lFT2MlgvW37oZvFw6RcGo9ltS63tmkG5RDQUbFotmVpEfQlseLAVerrRDfzHzrRv y/4BXapby/i+gaLyXhtzz6S9gYYnV3V3h5Gzmjb+2506OnuqifYxhdAwf6Csah+e tQ3PLTKkGQUI+Bq7/F5ioIylgj3s+v8X3QOGd5BDOelXU4GQqwO1xHeGHMGPtSOM /47RgTRC7n2j1emAiKITuYeRlYtMsTLKObPvlTaHRGaSRM02gHF7FTzK+EyEXhV1 jWe3oq7MlLvS+D5htb7M8UuYQ9IRz7rvmKr6Ej4YMLodlAuKqguNAmgn2y45Zkqm nWzmk4wAWu/LyQT92LSz =a9yo -----END PGP SIGNATURE----- --fpOoxkXNC2u1rLNqN9nj9w4dp7s19B8pf--