From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: lloda Newsgroups: gmane.lisp.guile.devel Subject: Re: [PATCH] New function array-mutable? Date: Thu, 25 Nov 2021 19:56:49 +0100 Message-ID: <367DEE5F-9FE4-457E-9B81-BB1605F1EDFF@sarc.name> References: <32F75DE0-14DA-4B7F-B6A9-81462A847A30@sarc.name> <53901e95268fe40d7bb426851af6e9e9354d2376.camel@telenet.be> Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.7\)) 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="30749"; mail-complaints-to="usenet@ciao.gmane.io" Cc: guile-devel To: Maxime Devos Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Thu Nov 25 19:57:13 2021 Return-path: Envelope-to: guile-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 1mqJvl-0007ov-Et for guile-devel@m.gmane-mx.org; Thu, 25 Nov 2021 19:57:13 +0100 Original-Received: from localhost ([::1]:50352 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mqJvk-0001IV-Ip for guile-devel@m.gmane-mx.org; Thu, 25 Nov 2021 13:57:12 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:40934) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mqJvT-0001GP-RH for guile-devel@gnu.org; Thu, 25 Nov 2021 13:56:56 -0500 Original-Received: from mta-15-4.privateemail.com ([198.54.127.111]:41694) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mqJvR-0001tw-IG for guile-devel@gnu.org; Thu, 25 Nov 2021 13:56:55 -0500 Original-Received: from mta-15.privateemail.com (localhost [127.0.0.1]) by mta-15.privateemail.com (Postfix) with ESMTP id D068618000A1; Thu, 25 Nov 2021 13:56:51 -0500 (EST) Original-Received: from [192.168.1.105] (unknown [10.20.151.209]) by mta-15.privateemail.com (Postfix) with ESMTPA id 4546A18000AD; Thu, 25 Nov 2021 13:56:51 -0500 (EST) In-Reply-To: <53901e95268fe40d7bb426851af6e9e9354d2376.camel@telenet.be> X-Mailer: Apple Mail (2.3608.120.23.2.7) X-Virus-Scanned: ClamAV using ClamSMTP Received-SPF: pass client-ip=198.54.127.111; envelope-from=lloda@sarc.name; helo=MTA-15-4.privateemail.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Original-Sender: "guile-devel" Xref: news.gmane.io gmane.lisp.guile.devel:20985 Archived-At: > On 25 Nov 2021, at 19:22, Maxime Devos wrote: >=20 > lloda schreef op do 25-11-2021 om 17:40 [+0100]: >> +Arrays with empty roots are not considered immutable because >> +@code{array-set!} operations with valid indices won't fail (since >> there >> +are no valid indices). >> + >> +@example >> +(array-mutable? #()) @result{} #t >> +@end example >> +@end deffn >=20 > By this logic, shouldn't empty subarrays (*) with a possibly mutable > and non-empty root be considered mutable as well? >=20 > (*) called =E2=80=98shared arrays=E2=80=99 in the manual >=20 > Greetings, > Maxime That would make sense, I think. The test in the patch is the same one that is used to validate = array_handle_xxx_writable_elements(), which looks only at the root and = not at the array dimensions. Those two tests should be the same, so I'll = have to change the test in array_handle_xxx_writable_elements(). Thanks Daniel