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: Sat, 24 Feb 2024 10:45:03 +0100 Message-ID: <7768784D-876F-4E75-8BA6-4DAAA55803A3@gmail.com> References: <170438379722.3921.9312235725296561206@vcs2.savannah.gnu.org> <19265EA5-E6F3-446C-AD9B-763693CF0A48@gmail.com> <6F3E332D-54ED-4E70-BBAA-A207750B52F8@gmail.com> <13877748-AFAB-4310-A0CA-104752C8BF2D@gmail.com> <5C9DFD74-B166-444E-BFDC-D022826098C8@gmail.com> <8F240949-B24F-4538-8ED1-7153F10AB5EC@gmail.com> <1BD12E80-6BC0-4B17-A0D8-8C47414C8911@gmail.com> <86sf1nnslp.fsf@gnu.org> <886A589C-5139-4FC9-8B59-636A9D6DFBD4@gmail.com> <86frxnnjq1.fsf@gnu.org> <86r0h6m0rh.fsf@gnu.org> <2E0CDF51-5871-4F53-91B0-33115E30B1F2@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="12115"; mail-complaints-to="usenet@ciao.gmane.io" Cc: gerd.moellmann@gmail.com, dmitry@gutov.dev, 68244@debbugs.gnu.org, monnier@iro.umontreal.ca, stefankangas@gmail.com To: Eli Zaretskii , Andrea Corallo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Feb 24 10:56:09 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 1rdolM-000302-Pn for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 24 Feb 2024 10:56:08 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rdoku-000759-IO; Sat, 24 Feb 2024 04:55:40 -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 1rdoks-00074U-Rm for bug-gnu-emacs@gnu.org; Sat, 24 Feb 2024 04:55:38 -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 1rdoks-0002bh-JE for bug-gnu-emacs@gnu.org; Sat, 24 Feb 2024 04:55:38 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rdolG-0008Ka-9x for bug-gnu-emacs@gnu.org; Sat, 24 Feb 2024 04:56: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: Sat, 24 Feb 2024 09:56: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.170876853031950 (code B ref 68244); Sat, 24 Feb 2024 09:56:02 +0000 Original-Received: (at 68244) by debbugs.gnu.org; 24 Feb 2024 09:55:30 +0000 Original-Received: from localhost ([127.0.0.1]:43930 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rdoki-0008J4-1s for submit@debbugs.gnu.org; Sat, 24 Feb 2024 04:55:30 -0500 Original-Received: from mail-wr1-f47.google.com ([209.85.221.47]:56757) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rdokB-0008HE-8D for 68244@debbugs.gnu.org; Sat, 24 Feb 2024 04:54:56 -0500 Original-Received: by mail-wr1-f47.google.com with SMTP id ffacd0b85a97d-33d2b354c72so838930f8f.1 for <68244@debbugs.gnu.org>; Sat, 24 Feb 2024 01:54:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708768405; x=1709373205; 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=s5uh1nzLG+YbJIUL3gzEwiwKGO3rqYmyrNDLeJihQBc=; b=UdaLoG5+AddAR3uETQVqzqwnFE9+I1piaukGfzmt3Fmf47T9abtWhQOd83SyYJoAzA zvarsz9ikzVWksA/wThRZRGAH4aVas3iKuqJ0m8TF7KU22MxL9NYCebJ1+x7tVFWanHm sdA4QCn6YZ6amXbW0rmFP4pkSQzKnoj/ZWwp37SPO5VTtjqYWigFqNypK6x8PxCOKyjf 6wscpXsuTeEd+wtNzat8qTCj8nbivCwdGZJ2CMWosZ7dCvvVY9L4Cyo8rk0AHX8ksrjd 4AnsmyI+DAmZm2aOAIUKHufH8J4PS4DuzU7nTjH5UI3/QibmLIXIcVRCTP+Tu//EId7L mXeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708768405; x=1709373205; 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=s5uh1nzLG+YbJIUL3gzEwiwKGO3rqYmyrNDLeJihQBc=; b=TNJI2CwNjNd8Xf/MV6frUefwjW1nBzOqZZvl9QNyZO7HfxDO4btZmqDt4MsxQTZgzx oCayoGJkAC2dQRvGeE0MjChaQ74Mp+fI9QXoN6vs/7qg5Ck+3MCdWzB3OWOdY1mhjDN7 j9c2YkN0hMcX9dsC2wC6cNfKV7rhCqQmeOjOFoG5583lJtTPaTp7Y3CYm6IT7u3HKn30 vgW11oqFCDJ89xC1KtdFW48q7G21yvLlytiBpDz2vLBntZkPxSBTPpxSnGAYYhTj0PdQ 8UQTpNKzzmso2m0ZaMLXCQrBahMn+51RDCE+NkwfdRtE4peGS9hDrxBs+sFjpvH1wn8p afog== X-Forwarded-Encrypted: i=1; AJvYcCWYQHrgCNG5/rZiviDvIQPBfkhpUb8b51VmkF9EzFSSzwGJcudkQfTFwf6wIPHM38WqgPs1CBXWezekwT5HacCThGvukJs= X-Gm-Message-State: AOJu0YwNVXDb7HCmMxZO2pNEjzWRg/q8egI/NBrN6kSefJf/Rcxf1y1P K1VnKht3VaNTrrtWiytKkl2mtXwTNeaf6gm/zvwff5NxcNTPNk8TAdzqFShA X-Google-Smtp-Source: AGHT+IFlnSsxx9eh99bQ4VU9CIhK53iPSql7sMv2xWJcyheS4j2qmDVxM4jmR3hbra3EXkYcEQ7kBA== X-Received: by 2002:a05:6512:ba2:b0:512:e394:5357 with SMTP id b34-20020a0565120ba200b00512e3945357mr1465194lfv.54.1708767905031; Sat, 24 Feb 2024 01:45:05 -0800 (PST) Original-Received: from smtpclient.apple (c80-217-1-132.bredband.tele2.se. [80.217.1.132]) by smtp.gmail.com with ESMTPSA id m9-20020a195209000000b00512f4e337e8sm74501lfb.300.2024.02.24.01.45.04 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 24 Feb 2024 01:45:04 -0800 (PST) In-Reply-To: <2E0CDF51-5871-4F53-91B0-33115E30B1F2@gmail.com> 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:280532 Archived-At: 15b6d72599b9 on master: > +If you have code which creates obarrays as a simple Lisp vector: > + > + (make-vector N nil) > + > +and then calls 'intern' using such an obarray as second argument, = this > +will now signal a wrong-type-argument error; replace nil with zero to > +make it work again. Thank you Eli, this might be useful, and you are absolutely right that = we should help users fix their code. But this cannot have come from nowhere. Did anyone actually tried to = create obarrays in this broken way? It goes against all previous = documentation and violates many invariants at once: it would have filled = an obarray with multiple copies of the nil symbol which itself is = interned in a different obarray. Running `mapatoms` would have given very surprising results (what does = nil have in its .u.s.next pointer? what happens if we remove nil from = this pseudo-obarray?) and it must have been a recipe for accidents. It = cannot have been a widespread usage. And if anyone did try to create an obarray in that incorrect way, better = recommend using `obarray-make` which is more future-safe than an already = obsolete form.