From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 30769 invoked from network); 4 Dec 2020 15:50:29 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 4 Dec 2020 15:50:29 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1607097029; b=oy/mnjcYcgcIsRILZ/wyPerK80YFmgtlm//kX83KE0M7Pi1zz+MXhbQADBEa7pF4Sc9eyBW+Rl mvet4sKI7lKSGGEtzaIRdWBYDHtHxL2o3mdtZudLoOQWUrw1htPKfJIAGuAHdTAh7+fD/0QPmD Ba9VY5/y19Fx+1Un3SdMrNdP2tomVIzp4mMzUR0+jK1FUXdMIrpdLSODFcjLJP2MXCmSFDCWhn sPpPUTe3ZXKdMDwYBPpxMdmmwPjJH4Iq5f2ioX5u9n1MbQ0Xz+LbaWoN4mY++LzcY3vHf4z3Zy 1ZecT4VzdHTwQpAEOj4BxWSW1OlWlJNvwGqb2vIkF8nMEQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ot1-f43.google.com) smtp.remote-ip=209.85.210.43; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1607097029; bh=BqwCjbRJfO0cMJ4zEothlqx+mVGrM6VC6p8d8Ui32pY=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=mqIqgvDz2gXez19eYXjaPBRP3L3Sj+xsgrzPRa3bfAcEuBl/rVd+Ms3qNEnEmhnhvIfTZLO0T9 OqSL0czrlgAx91AYybOuDlybF/ACGRNfgiTvsYbZO3nVLec59BeeUqZTsocEILt51KY9TC/nuV UK8LuLktWN3O+PfK6dNI41gHdTwBI/xZHCy908ZfFRV5PDScdog1I4TtMbCosRYKxs2m/XBTOd wHz/n6CysM6qxaKjhpapj/YL7g15J1JagtqTDcHU1pRa4RwJEMcCVL94fiZiz4jPNa79tZrYel Nh9zPkporRf5HLuJJksdW8msnGtMfMqUTQwNBDpvQeCzbg==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=yXIfpMPXiXci/ao7vIO8Z6gXtjdY9foRPWZ8TfmRIu0=; b=W885KIXu8qQO1DqfSxojQd1hVY IyjhGFeMoHl3bn8mg4fzezTr0t+aiM/MMbJV8g6pBs8lDFfWfr5uX83ptK/kHz7n0myOdVhG5I3X3 JoCWJme0p0onyxkvSW0RcNFLSrafaSav/z4/lVvaHhkrDBI9L5NS/AWVdHCsSkrASGBeOU9o5pLdp RzVBnde+HswMtigg+p1M2By22I9uQI1R4Cs6TG20s/3/SvRwWYknTtPDcxvVGkmTi3EdFVf1hJRn9 KXYehQg+Fh9sDB95cJDuDzyxDxolTq7lKRN03crr8m7EpikhZcD2SjpWfGKV2YNTkNLtnHiD7e5OQ OyRdIXXg==; Received: from authenticated user by zero.zsh.org with local id 1klDLm-000HCF-AH; Fri, 04 Dec 2020 15:50:26 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ot1-f43.google.com) smtp.remote-ip=209.85.210.43; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-ot1-f43.google.com ([209.85.210.43]:39612) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1klDLU-000H2j-5f; Fri, 04 Dec 2020 15:50:09 +0000 Received: by mail-ot1-f43.google.com with SMTP id z24so5587596oto.6 for ; Fri, 04 Dec 2020 07:50:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=yXIfpMPXiXci/ao7vIO8Z6gXtjdY9foRPWZ8TfmRIu0=; b=OWm0bfycvI1SKFhWhE1W6yFX9SZmZWIfsV5KOZYEyBTScj1bfsmcxqNT8SLYb6DLYr XfwGsb8UV70+pVGJPwMdi9xzX9AleKZcpvSHfFnX2bt7j92AXaXo/enA6Cv6C+V1/1C6 yrNcmVi8dhdOBRSJKMGvLOz6mxb1kw9m2JW4K4dSl+h+EEVl5MVa0qNmojZ2XrrLPDhG 2pITM1iMvYNNGk1IxqSfYnmY6T2/q6D/U50+2Lvh/SNBGWaXTOyuNNb5epTcGhmo5jqB /I00QPIvbt8M4U6Vf7Hxq5ukokgweCh8V9L5MWp0hyZeI/S1vHqAFkhmyzDtw+R1kIPL A3DQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=yXIfpMPXiXci/ao7vIO8Z6gXtjdY9foRPWZ8TfmRIu0=; b=CM0eZvahduVpjwzekNZ0oW12TMAD8QFHnAUVZNeeRNWYrNaEl2GyQGYY1mwLAirrtZ o4DcMZIVKQDfeLqWIwlron2AMiF7dXRkdOAttbAO69Jg7l8jaF0eWTe4P9gsiuATp9Kh 8Xh3Y0o+ikwzhi1rM9Rv9L5WKBuVoEKMN/Khw14ae8UznMe5DHdN/TjvoGrnOtfQa6W2 WpGLHdJlfMKF8votbGPaNJdNnWWhd2/kXOJyRC1hjWP0z70uuF4TX4DVnGT+7pL24m6h jO7K1ubTAU2k3UAzAJCs8Oz2VkoawBiPZpY9FLZQxEvmlJUDODlFfiBOrK3n3Yxd+CkY c+wQ== X-Gm-Message-State: AOAM532H+N43JaKeGfDTXt6xtHYvnULx8cIaqtt3T4c1wR4lH9UlAnxt 57VOZLOtsxc3u6dY5DrmjyY5ELwEWVk5Hu2Yi0VuOg== X-Google-Smtp-Source: ABdhPJwktmcM58U7Q+WMedF/i17kyRUe/XgDm2mBgA9hxa9c6D4E6NFotRQRXBSLY+Z+OTPbpviF/OQjLyDJ74TZf84= X-Received: by 2002:a9d:470c:: with SMTP id a12mr3989546otf.161.1607097005636; Fri, 04 Dec 2020 07:50:05 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Bart Schaefer Date: Fri, 4 Dec 2020 07:49:54 -0800 Message-ID: Subject: Re: One possible answer to typeset vs. unset To: Felipe Contreras Cc: Zsh hackers list Content-Type: text/plain; charset="UTF-8" X-Seq: 47721 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Archived-At: On Fri, Dec 4, 2020 at 3:04 AM Felipe Contreras wrote: > > On Thu, Dec 3, 2020 at 3:19 PM Bart Schaefer wrote: > > > > I looked at this for a while yesterday evening. My conclusion is that > > tied variables are already a bit of a hack. Part of my latest commit log on the declarednull branch: The scalar struct param of a tied pair stores a direct pointer to the internal array value of the array struct param, and upon assignment modifies it without referring to the containing struct. This means that there's no opportunity to clear the PM_DECLAREDNULL bits on both structs when the scalar is assigned. Conversely, assigning to the array does use the struct for the scalar. I think this can be fixed but I don't want it to become inefficient. OTOH, tied parameters (other than specials, which are different in several ways) may not be used (or updated when they are) very much. > > Consequently I don't know if your patch would cause a different test > > for unset-ness (that hasn't been written yet) to fail, but something > > like that patch may be unavoidable. > > I can't parse that. What would such unset-ness test do? Check that both elements of the pair appear to be unset when neither has been initialized. As it currently stands on the branch, following typeset -T TIED_SCALAR tied_array These typeset -p TIED_SCALAR typeset -p tied_array print differing initializers.