From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.bugs Subject: bug#68244: hash-table improvements Date: Wed, 14 Feb 2024 13:37:49 +0100 Message-ID: <5C9DFD74-B166-444E-BFDC-D022826098C8@gmail.com> References: <170438379722.3921.9312235725296561206@vcs2.savannah.gnu.org> <08314177-5AE9-4352-94A0-641830B4094D@gmail.com> <19265EA5-E6F3-446C-AD9B-763693CF0A48@gmail.com> <6F3E332D-54ED-4E70-BBAA-A207750B52F8@gmail.com> <13877748-AFAB-4310-A0CA-104752C8BF2D@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18848"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Gerd =?UTF-8?Q?M=C3=B6llmann?= , Dmitry Gutov , Eli Zaretskii , 68244@debbugs.gnu.org, Stefan Kangas To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Feb 14 13:40:25 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1raEYr-0004g4-Cc for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 14 Feb 2024 13:40:25 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1raEYF-0003Tp-5h; Wed, 14 Feb 2024 07:39:47 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1raEYD-0003TX-0k for bug-gnu-emacs@gnu.org; Wed, 14 Feb 2024 07:39:45 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1raEYC-0002ft-Hh for bug-gnu-emacs@gnu.org; Wed, 14 Feb 2024 07:39:44 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1raEYU-0003vn-FP for bug-gnu-emacs@gnu.org; Wed, 14 Feb 2024 07:40:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 14 Feb 2024 12:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68244 X-GNU-PR-Package: emacs Original-Received: via spool by 68244-submit@debbugs.gnu.org id=B68244.170791435615046 (code B ref 68244); Wed, 14 Feb 2024 12:40:02 +0000 Original-Received: (at 68244) by debbugs.gnu.org; 14 Feb 2024 12:39:16 +0000 Original-Received: from localhost ([127.0.0.1]:50718 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1raEXk-0003ub-2t for submit@debbugs.gnu.org; Wed, 14 Feb 2024 07:39:16 -0500 Original-Received: from mail-lf1-f46.google.com ([209.85.167.46]:59602) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1raEXi-0003uK-Be for 68244@debbugs.gnu.org; Wed, 14 Feb 2024 07:39:15 -0500 Original-Received: by mail-lf1-f46.google.com with SMTP id 2adb3069b0e04-511a45f6a57so970584e87.2 for <68244@debbugs.gnu.org>; Wed, 14 Feb 2024 04:38:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707914270; x=1708519070; darn=debbugs.gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:from:to:cc:subject :date:message-id:reply-to; bh=YUSsgHjgGe+XZSCro1nfDJ5INqXSo5KluBYP1iCFrGM=; b=GXFLcrOEoyYgbZu4O2aBB0W0qA/FxVk7lkFw+nqTt0Or7h5UgC/pO2S6SU8TWVnyEE Pj07zduploFM6efdCNSaa2618qHeBYGVtrXjd6TLF31f7D3NxUPAab/jaJoJSz9DWAGQ LC90Gye0otdFA4/gJ0aYCcX2Iu8Jaxdr3ZqmbRr0H4drxL9vYjSe5/jUq+HxI4k1lQ9P DMuLzPGbU7mnqTQyvCNiTgJi1xCz01dCc74TbKR9ut2rAC14hzZAwOsisEDkyux0mK8i 3nVH41asFf9XI3YpYgiOpndb7WG2wsuriSm6Ef+FG5K8IxZJfUWRruUJ0z2OisspCcXr ZvTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707914270; x=1708519070; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=YUSsgHjgGe+XZSCro1nfDJ5INqXSo5KluBYP1iCFrGM=; b=awg2rm2AH+lJx/DXam7ius/Y/qxqlLE3vr8edbRXqmqHYZD+Gk/0Q9pTsuBRrlHoD8 gQYIJMwicL//qH1pq/KsytcWbL/ylKp7VS7ql5FuaPpaHD4j40ScjQw5TjStf0pdkVYU HHM4wYnumC1YlLalrYQ4PQ7EXIkW/OtIbdG1O7TsoGx4ihY+Fy0zRtyhTdR8H9SpxZQ6 1/YnDLweQ1kzWE2kh73aRdcJprbtUmzv+s7r7k0iCL/6f9ISFwHmE98i9hJ4lD+6Xjce Rtb++cFpz1CFXXmklbd7C+ZkdgVMVNmseZrMKPJ5Gbv4Kc99SX9tU5sSwB2KGxChUFqJ UDNQ== X-Forwarded-Encrypted: i=1; AJvYcCXdaahkncyTePxMuUyUeXMaBafY/XDOdyoqZiS7NsCDm9fV2UgfJRanpWPMAKmoQKaHUWb/ub0G5m55N5/px35qjaTjXA0= X-Gm-Message-State: AOJu0YyAXGkLk/kJ76UnxYCMUiuYuuatUij9pPPgwUprQ2vL5HSBJvsp 8oVLfNWLGzCS4Z7bW9HYpI5Gfven6KurUbiiSRExhp/FZp5SwTNP X-Google-Smtp-Source: AGHT+IEuQVYaYBW9tjApe/jUaTsKH0lOX0FMPZu5kw7gWN1J0aqBvR3+C8sTKlZhIZx6nNVE+W10zQ== X-Received: by 2002:ac2:484d:0:b0:511:8e33:639 with SMTP id 13-20020ac2484d000000b005118e330639mr2027758lfy.8.1707914270025; Wed, 14 Feb 2024 04:37:50 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCWzZddQtx0RuKrWV8WqnCVGsMg+P/LSAzqFJBaxjt8Qz33wUbFo1dhfsCSPB5DxW/MGyXj+b9DC6Y6HlMD1m1gX1HT9xb4yrfohW6J8iUhBZrD3gTGLvXVla4b5scRbg7bCQJdQmjnhVL1BylBws2HiTdGZYYg66GRxRIPE6Q== Original-Received: from smtpclient.apple (c80-217-1-132.bredband.tele2.se. [80.217.1.132]) by smtp.gmail.com with ESMTPSA id l5-20020ac25545000000b0051145f90c3bsm1663582lfk.67.2024.02.14.04.37.49 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Feb 2024 04:37:49 -0800 (PST) In-Reply-To: X-Mailer: Apple Mail (2.3654.120.0.1.15) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:280002 Archived-At: 13 feb. 2024 kl. 13.43 skrev Stefan Monnier : >> A more worrying problem is code that uses `obarray-make` but assumes = the >> result to be vectors. It may be unsafe to let obarray-make return an = obarray >> object for that reason. >=20 > I don't think it'd be "unsafe": it just introduces a bit > of incompatibility. > But `obarrayp` has been with us since Emacs-25 and it's trivial to > change code using `vectorp`, so I wouldn't worry about it. If we can do that, it's naturally preferable. Let's see how it goes. >> With Stefan's suggestion, if I understood it right, >> we'd have `obarray-make` return (vector 0). >=20 > I did not suggest such a thing. Sorry, didn't mean to misrepresent. I should have said that it is one = way of implementing `obarray-make` if compatibility with vector-assuming = code really is a serious concern. > I think it's worth introducing a bit of incompatibility, for the = benefit > of a cleaner API. Such incompatibility should be very easy to fix = while > still maintaining compatibility with old Emacsen (at least back to > Emacs-25, where the `obarray-make` and `obarrayp` were introduced). I'm all for it but those obarray functions weren't mentioned in NEWS at = the time nor in the manual (which even today recommends, even mandates, = use of make-vector) so perhaps we need a bridge?