From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: Better way to require with shorthands/renamed symbols Date: Mon, 27 Sep 2021 15:55:51 +0300 Message-ID: <0b213c21-aacb-fe9b-11c8-0c4e777fe14d@yandex.ru> References: <20210927003203.15806.29864@vcs0.savannah.gnu.org> <20210927003205.EF26620A5E@vcs0.savannah.gnu.org> <8735pqryt2.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20401"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 Cc: Adam Porter , emacs-devel@gnu.org To: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= , Stefan Kangas Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Sep 27 14:57:45 2021 Return-path: Envelope-to: ged-emacs-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 1mUqCV-000544-Ev for ged-emacs-devel@m.gmane-mx.org; Mon, 27 Sep 2021 14:57:43 +0200 Original-Received: from localhost ([::1]:37162 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mUqCT-0005U7-QF for ged-emacs-devel@m.gmane-mx.org; Mon, 27 Sep 2021 08:57:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38946) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mUqAp-0003ni-2M for emacs-devel@gnu.org; Mon, 27 Sep 2021 08:55:59 -0400 Original-Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:44817) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mUqAn-0004Lu-5c for emacs-devel@gnu.org; Mon, 27 Sep 2021 08:55:58 -0400 Original-Received: by mail-wr1-x429.google.com with SMTP id d6so51626161wrc.11 for ; Mon, 27 Sep 2021 05:55:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=nuGf7iFF8KqpNn91ulFATpRi8o5mRARIBLcg8+TNj/s=; b=SRBfrzkNRwq1ZCj1MRWNNiWGrgqufdvselWsNtkf9OKI4IhvHhwOhlvxV/zTDkbv+J nmgEok8t2622bvNCb33sh0Vh22nZuOcmEknV0B0pjoi9hlL/M/mgCv7ne71aSX99sxx8 1ZJGvgR4qPZqKfE2rf3vvOWizsfAEFZ59LyP/xN/QsmEECTSb/oLVV4k9o7f5N8j29Wp wGjwL55SNf2svgpS+U+gS/nR0Ey9d3QJ/gLR0KHY4WBaRNp+kkWgvzt+iP3OBROYD2JY NPJ87lr+8JA1Zo5vtsrpQDnH7HaB6IH02vOjFpRq3GmwPegVq/RLslFOyW/sAazsF8Vx ufTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=nuGf7iFF8KqpNn91ulFATpRi8o5mRARIBLcg8+TNj/s=; b=MbDF8k2XwPtzQPZxwSePaSl4GnSDOnd257g7/h8nPh/u758gQYnjgqO9UWxXqRSQvL x40nE74dKncQO1uN05Xe08t5dVbFB+d7b9kI3aPtW94Rksb1694IQuC9h/G5si87L6qm 47HtkHe1h+yok2+9PiaEoWVaesK7ix1rGCGzR7i3fhF0mb4lAPPEQO56sZHeZbiid+5L 8mqRWH4i2mBKgiS1N7i2xZURPVFKnwAVluXcR3IJIaxNyC37bchDaX24l4i1beh2CWxt N39InhhrN9AyzkP95hT6g0MupTQpBIgtTwMIFoMtoBU9JP5TEvJArnTD7Lcz9iLyXvqk ILzw== X-Gm-Message-State: AOAM533mxs0rp+566o83nFQSx1Rb9CNxZBSVV69j0b+s+CD8l4c4cWav QM3PbhouhUMD5p7SuieaYexxSJqVZ9w= X-Google-Smtp-Source: ABdhPJwzD59AnJoTs53Svi8qi9SBEENnsE5ELhOPSK4UXgRkvnnaAk8AWzoW7cssl5s68ZWcT8H3sw== X-Received: by 2002:a5d:6a08:: with SMTP id m8mr27092129wru.336.1632747355791; Mon, 27 Sep 2021 05:55:55 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id o1sm16994219wmq.26.2021.09.27.05.55.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 27 Sep 2021 05:55:55 -0700 (PDT) In-Reply-To: <8735pqryt2.fsf@gmail.com> Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=raaahh@gmail.com; helo=mail-wr1-x429.google.com X-Spam_score_int: -45 X-Spam_score: -4.6 X-Spam_bar: ---- X-Spam_report: (-4.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NICE_REPLY_A=-3.136, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:275581 Archived-At: On 27.09.2021 15:24, João Távora wrote: > One should understand (or perhaps, as a programmer, one _must_ > understand) that the Shorthands feature works at the Lisp reader level. > > It's tricky to think about the execution of that manifestation of the > 'require' special and what it does at the Shorthands level. You're > probably thinking of putting it on the top of your file, which is the > most common case, but far from the only use. What if it happens at > non-top level, in an IF form? What if it happen sat top level but in > the middle of the file? It would amount to setting variables that > influence the reader during the read process. I think the key part is for this info to reside somewhere near the top of the file (if not in the require form, then above it, maybe). > As Stefan Monnier once wrote (here?), implementing namespace systems > isn't hard in itself (it wasn't here). It's making the tooling around > it consistent. The latter was only possible with the Shorthands feature > because of the relative dumbness of its approach. BTW, it seems the new feature will need dedicated support in xref-backend-references as well.