From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Add user content APIs for WebKit Xwidgets Date: Sun, 16 Oct 2022 08:26:27 +0800 Message-ID: <87r0z8mx58.fsf@yahoo.com> References: <763B89A7-AF82-4AAB-A0E9-A04D9958CAE8@stanford.edu> <878rlianx4.fsf@yahoo.com> <9FF9464C-1369-423E-A581-A900D132845F@stanford.edu> <87zgdy97t1.fsf@yahoo.com> <63F00459-018C-4634-9B52-A89A3ED1AA36@stanford.edu> <0F1442C8-45E2-408C-B310-448B4A26496E@stanford.edu> <87ilklnxei.fsf@yahoo.com> <77860A2D-FF21-4EF0-A2E8-769A041B0B55@stanford.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3821"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Lars Ingebrigtsen , "emacs-devel@gnu.org" To: Qiantan Hong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Oct 16 02:28:08 2022 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 1ojrVf-0000oE-MX for ged-emacs-devel@m.gmane-mx.org; Sun, 16 Oct 2022 02:28:07 +0200 Original-Received: from localhost ([::1]:59568 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ojrVe-0007li-6b for ged-emacs-devel@m.gmane-mx.org; Sat, 15 Oct 2022 20:28:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42238) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ojrUI-00073B-Dv for emacs-devel@gnu.org; Sat, 15 Oct 2022 20:26:42 -0400 Original-Received: from sonic317-33.consmr.mail.ne1.yahoo.com ([66.163.184.44]:46615) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ojrUG-0000vh-8G for emacs-devel@gnu.org; Sat, 15 Oct 2022 20:26:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1665879995; bh=rQ8SZg4m5wuJhwJekixDwr7T/itkn9Twhj2S4IVnhd0=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=shhWrhfqrStp346EA1kxsGnKkFcs0ei5UrR/UQpFKPwE4uJnOA9g07Q+uJ4Jb62SCGlGIkmF8pZ4vgY2RswXFpcxofZpWb82MEm2z3VsDjCBIPteqL/A2uVNXYKVqKoxdbTzAKqs+VL/ditCm7m0w4OLo8Dg+xbHBlYvYYM9ehp4go2sdGivxamrWvrWP7l7yrnJWYAYyvEzzuJJbiiyVFR7z4MyiK3XSZfrKZIkeoyE+g4f4AAkS5WimhSD4yHuGufPsDInvbZMW+UWYXLY+vbEOauhqsaTzgS6pQYgMz85hv2IO/SbjTq/xRXRn3ZOhUrgTIuAg6oWev4la9egFA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1665879995; bh=LGYC4QmQRrSQSovrNnRYMxW7NnEGWvnGgl5KngJYx7U=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=t3uCoYaS41wAy/3nTo0v5xlc+XzBECmNpybbeJ9XzzxX5K6NlDNtAQYLyEOxjEuN1nVpKj2rAF55T5LyjZzXPAIMaO+fGs+0ukQ/qDv/jld1Zs3XU9qNRLvHa/HjEEp7Sue7Nz6aEhKjt53axyJ3YG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: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic317.consmr.mail.ne1.yahoo.com with HTTP; Sun, 16 Oct 2022 00:26:35 +0000 Original-Received: by hermes--production-sg3-785466d859-7l8f2 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID f2f28c562b0fe86719756369eebc300b; Sun, 16 Oct 2022 00:26:33 +0000 (UTC) In-Reply-To: <77860A2D-FF21-4EF0-A2E8-769A041B0B55@stanford.edu> (Qiantan Hong's message of "Sat, 15 Oct 2022 18:29:35 +0000") X-Mailer: WebService/1.1.20754 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.184.44; envelope-from=luangruo@yahoo.com; helo=sonic317-33.consmr.mail.ne1.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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:297823 Archived-At: Qiantan Hong writes: > I see similar intern usage for "xwidget-internal=E2=80=9D, "download-call= back=E2=80=9D > and "javascript-callback=E2=80=9D in xwidget.c. I was trying to be consis= tent. > If I=E2=80=99m changing to Qscript_message should those be changed too? Sure. > name is used as a symbol/identifier in a namespace in JavaScript.=20 > It is used in the form of =E2=80=9CmessageHandlers.name=E2=80=9D. Therefo= re I wanted > to map it to something conceptually similar in Lisp, i.e. a Lisp symbol. > That way we get efficient comparison and EQ lookup (useful for identifier= s!) > by sacrificing string-manipulating operations (not that often for identif= iers!). > For example, I need to lookup a handler in an ALIST for every script-mess= age. > Does that make sense? assoc is fast unless you have lots of handlers, in which case I'd be more worried about using an alist. Anyway, you proceed to copy the symbol name into a string and intern it later. That is not correct, since the symbol given may be uninterned.