From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Generators (iterators) for Gnu Emacs Date: Fri, 05 Dec 2014 14:19:38 -0500 Message-ID: References: <877fy77zhp.fsf@web.de> <871toern60.fsf@web.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1417807216 8436 80.91.229.3 (5 Dec 2014 19:20:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 5 Dec 2014 19:20:16 +0000 (UTC) Cc: emacs-devel@gnu.org To: Michael Heerdegen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 05 20:20:09 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 1XwyQC-00031H-Tv for ged-emacs-devel@m.gmane.org; Fri, 05 Dec 2014 20:20:09 +0100 Original-Received: from localhost ([::1]:52174 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XwyQC-0006MO-Fo for ged-emacs-devel@m.gmane.org; Fri, 05 Dec 2014 14:20:08 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44141) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XwyPr-0006Jk-7T for emacs-devel@gnu.org; Fri, 05 Dec 2014 14:19:54 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XwyPj-00051q-NX for emacs-devel@gnu.org; Fri, 05 Dec 2014 14:19:47 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:16320) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XwyPj-00051d-ID for emacs-devel@gnu.org; Fri, 05 Dec 2014 14:19:39 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjsPAOwQflRMCqTq/2dsb2JhbABbgweDYIVaxR0EAgKBJBcBAQEBAQF8hAMBAQMBViMQCzQSFBgNJIhKCdZZAQEBAQYBAQEBHpBvB4RIBYsBkjGPc4IKgXiEGSGCdwEBAQ X-IPAS-Result: AjsPAOwQflRMCqTq/2dsb2JhbABbgweDYIVaxR0EAgKBJBcBAQEBAQF8hAMBAQMBViMQCzQSFBgNJIhKCdZZAQEBAQYBAQEBHpBvB4RIBYsBkjGPc4IKgXiEGSGCdwEBAQ X-IronPort-AV: E=Sophos;i="5.07,502,1413259200"; d="scan'208";a="99662150" Original-Received: from 76-10-164-234.dsl.teksavvy.com (HELO pastel.home) ([76.10.164.234]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 05 Dec 2014 14:19:39 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id DA48087F8; Fri, 5 Dec 2014 14:19:38 -0500 (EST) In-Reply-To: <871toern60.fsf@web.de> (Michael Heerdegen's message of "Fri, 05 Dec 2014 19:01:27 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 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:178995 Archived-At: >> I guess a `gen-cons' would be more efficient than this >> (gen-append (gen-from-elts value) ...). > I'm not sure implementing `gen-cons' is a good idea. I only meant it as an optimization of (gen-append (gen-from-elts value) ...). This form appears twice in your file. >> > (defmacro gen-delay-expr (expression) >> Have you made use of this? I'm not sure it really fits. I mean, >> technically it works, but I'm not completely sure if pretending it's >> a generator is a clever idea or not. > I defined it because I need it in `gen-cache', and because it wasn't > existing yet in Emacs. Do you think delay-expression should be defined > somewhere else in Emacs? Then I would be happy to use it for > `gen-cache'. Not sure. There's some overlap with url-future.el (which only has the "url-" prefix because we didn't want to grab the "future-" prefix without first getting more experience with the corresponding abstraction). Stefan