From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Oddities with dynamic modules Date: Thu, 11 Oct 2018 21:12:54 +0300 Message-ID: <83y3b4wdw9.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1539281460 5341 195.159.176.226 (11 Oct 2018 18:11:00 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 11 Oct 2018 18:11:00 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 11 20:10:56 2018 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 1gAfQF-0001G1-50 for ged-emacs-devel@m.gmane.org; Thu, 11 Oct 2018 20:10:55 +0200 Original-Received: from localhost ([::1]:35848 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gAfSL-0007bm-OH for ged-emacs-devel@m.gmane.org; Thu, 11 Oct 2018 14:13:05 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51881) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gAfSF-0007bU-M2 for emacs-devel@gnu.org; Thu, 11 Oct 2018 14:13:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gAfSB-0007yk-Hb for emacs-devel@gnu.org; Thu, 11 Oct 2018 14:12:59 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:35157) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gAfS9-0007y1-TZ for emacs-devel@gnu.org; Thu, 11 Oct 2018 14:12:54 -0400 Original-Received: from [176.228.60.248] (port=2353 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gAfS9-0008BI-GD for emacs-devel@gnu.org; Thu, 11 Oct 2018 14:12:53 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e 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:230339 Archived-At: Having written the documentation of the module API, I couldn't help but notice a few oddities about its repertory. I list below the issues that caused me to raise a brow, for the record: . Why do we have functions to access vectors, but not functions to access lists? I always thought lists were more important for Emacs than vectors. If we are asking users to use 'intern' to access 'car' and 'cdr', why not 'aref' and 'aset'? . Why aren't there API functions to _create_ lists and vectors? . Using 'funcall' is unnecessarily cumbersome, because the function to be called is passed as an 'emacs_value'. Why don't we have a variant that just accepts a name of a Lisp-callable function as a C string? . Why does 'intern' only handle pure ASCII symbol names? It's not like supporting non-ASCII names is hard. . I could understand why equality predicates are not provided in the API, but I don't understand why we do provide 'eq' there. Is it that much more important than the other predicates? IOW, if the API was supposed to be minimal, it looks like it isn't; and if it wasn't supposed to be minimal, then some important/popular functions are strangely missing, for reasons I couldn't wrap my head around. Thanks.