From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Andrea Corallo Newsgroups: gmane.emacs.devel Subject: Re: On elisp running native Date: Sun, 15 Mar 2020 20:10:00 +0000 Message-ID: References: <87y2s18zrq.fsf@spensertruex.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="92148"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) Cc: emacs-devel@gnu.org To: Spenser Truex Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Mar 15 21:14:02 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jDZe5-000NrJ-LF for ged-emacs-devel@m.gmane-mx.org; Sun, 15 Mar 2020 21:14:01 +0100 Original-Received: from localhost ([::1]:57906 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jDZe4-0005P9-64 for ged-emacs-devel@m.gmane-mx.org; Sun, 15 Mar 2020 16:14:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52011) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jDZaG-0003eA-Cb for emacs-devel@gnu.org; Sun, 15 Mar 2020 16:10:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jDZaF-0005ZC-5D for emacs-devel@gnu.org; Sun, 15 Mar 2020 16:10:04 -0400 Original-Received: from mx.sdf.org ([205.166.94.20]:52875) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jDZaE-0005UO-No for emacs-devel@gnu.org; Sun, 15 Mar 2020 16:10:03 -0400 Original-Received: from sdf.org (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 02FKA0FW017492 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Sun, 15 Mar 2020 20:10:00 GMT Original-Received: (from akrl@localhost) by sdf.org (8.15.2/8.12.8/Submit) id 02FKA0YM012821; Sun, 15 Mar 2020 20:10:00 GMT In-Reply-To: <87y2s18zrq.fsf@spensertruex.com> (Spenser Truex's message of "Sun, 15 Mar 2020 07:21:29 -0700") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 205.166.94.20 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:245544 Archived-At: Spenser Truex writes: > Andrea Corallo writes: > >> In case this is of interest I'd love to see it as feature branch to >> better collect feedback and work on its evolution. > > I have a comment about `1.6 Compiler hints' http://akrl.sdf.org/gccemacs.html#org7d51b3b > > I think it is better to avoid using separate symbol for each hint, and instead > use on that looks like a normal prefix notation. > > (comp-hint-cons x) --> (comp-hint cons x) > > This keeps the namespace cleaner. Also, consider the situation of specifying > multiple types, which may be desired at some point: > > (comp-hint (cons fixnum...) x) > > which can't be done symbolically > > (comp-hint-cons-fixnum-...? x) > (comp-hint-fixnum-cons...? x) > > All this compiler stuff is way over my head, so if my syntactic taste is > overshadowed by a more important consideration I will not be surprised. Hi Spenser, two thoughts on this: - `comp-hint-cons' and `comp-hint-fixnum' are imagined to be produced by macro expansion and not meant to be used directly by the user. - As of today the compiler is not that smart to take advantage of something that can potentially more then one type and I don't know if it will ever be, at least for the code generation side. Perhaps could be useful for code analysis and diagnostic. That said you are right this is not really flexible or general and I think your suggestion is correct. Thanks! Andrea -- akrl@sdf.org