From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tom Tromey Newsgroups: gmane.emacs.devel Subject: Re: Elisp printer Date: Tue, 07 Mar 2017 21:09:50 -0700 Message-ID: <87zigwz9wx.fsf@tromey.com> References: <87pokampa4.fsf@ericabrahamsen.net> <8760m2mmlq.fsf@ericabrahamsen.net> <87lguq5r87.fsf@ericabrahamsen.net> <878tp0i74g.fsf@users.sourceforge.net> <87efyg6y0i.fsf_-_@drachen> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1488946254 19757 195.159.176.226 (8 Mar 2017 04:10:54 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 8 Mar 2017 04:10:54 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 08 05:10:49 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1clSw2-0004G9-OU for ged-emacs-devel@m.gmane.org; Wed, 08 Mar 2017 05:10:47 +0100 Original-Received: from localhost ([::1]:53926 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1clSw9-0006fg-1C for ged-emacs-devel@m.gmane.org; Tue, 07 Mar 2017 23:10:53 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37390) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1clSva-0006fQ-6r for emacs-devel@gnu.org; Tue, 07 Mar 2017 23:10:19 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1clSvV-000613-7S for emacs-devel@gnu.org; Tue, 07 Mar 2017 23:10:18 -0500 Original-Received: from gproxy4-pub.mail.unifiedlayer.com ([69.89.23.142]:60327) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1clSvU-00060s-Pv for emacs-devel@gnu.org; Tue, 07 Mar 2017 23:10:13 -0500 Original-Received: (qmail 17717 invoked by uid 0); 8 Mar 2017 04:09:57 -0000 Original-Received: from unknown (HELO CMOut01) (10.0.90.82) by gproxy4.mail.unifiedlayer.com with SMTP; 8 Mar 2017 04:09:57 -0000 Original-Received: from box522.bluehost.com ([74.220.219.122]) by CMOut01 with id tG9r1u00M2f2jeq01G9uVA; Tue, 07 Mar 2017 21:09:57 -0700 X-Authority-Analysis: v=2.1 cv=Ath9goNP c=1 sm=1 tr=0 a=GsOEXm/OWkKvwdLVJsfwcA==:117 a=GsOEXm/OWkKvwdLVJsfwcA==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=6Iz7jQTuP9IA:10 a=OnAuoXnb9A4f-lPw6b8A:9 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=DgVMbYqc5CD10JovCzTtWRcf29h2vjZwoLEw0lmdUUg=; b=HVi1MZKOCMNtvANOsmXWtlGklH s7GJF5nR4pdqA+g2HgBtgmxJEMCO2p2PzBouhqu8NdaK05+aUd7Wr5aVb/oT/jnuWCFBVoq9ah5dO iJkAxbs77jpYpH24se5FHnHtI; Original-Received: from 67-6-181-22.hlrn.qwest.net ([67.6.181.22]:58730 helo=bapiya) by box522.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.87) (envelope-from ) id 1clSv8-0000mA-VX; Tue, 07 Mar 2017 21:09:51 -0700 X-Attribution: Tom In-Reply-To: (Stefan Monnier's message of "Thu, 02 Mar 2017 01:38:20 -0500") X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box522.bluehost.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 67.6.181.22 X-Exim-ID: 1clSv8-0000mA-VX X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 67-6-181-22.hlrn.qwest.net (bapiya) [67.6.181.22]:58730 X-Source-Auth: tom+tromey.com X-Email-Count: 2 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTIyLmJsdWVob3N0LmNvbQ== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 69.89.23.142 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:212826 Archived-At: >>>>> "Stefan" == Stefan Monnier writes: Stefan> PS: I wish we could have funcallable defstructs, so we could Stefan> efficiently dispatch on the "type" of functions when those functions Stefan> are used as objects. I was wondering about this a while ago and thinking that maybe it could be done without C changes by repurposing the extra arguments to make-byte-code. The idea here would be to let cl-defsubst take a new :type argument other than 'vector or 'list, meaning "use make-byte-code"; and set the :initial-offset to skip over the stuff necessary for the bytecode. It's kind of hacky though. I think it's probably better to just add funcallable instances directly, and real types of some kind at the same time. Tom