From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master) Date: Tue, 28 Sep 2021 08:21:03 +0100 Message-ID: <87ee99dv34.fsf@gmail.com> References: <16338bdc2497fc51c6fb6d54ab370bfb@webmail.orcon.net.nz> Mime-Version: 1.0 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="19839"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: emacs-devel To: Phil Sainty Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Sep 28 09:22:41 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 1mV7Rp-0004zT-PA for ged-emacs-devel@m.gmane-mx.org; Tue, 28 Sep 2021 09:22:41 +0200 Original-Received: from localhost ([::1]:40028 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mV7Rm-0002f3-Sv for ged-emacs-devel@m.gmane-mx.org; Tue, 28 Sep 2021 03:22:38 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46486) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mV7QL-0000ah-Ic for emacs-devel@gnu.org; Tue, 28 Sep 2021 03:21:09 -0400 Original-Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]:38812) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mV7QJ-00030v-Mr for emacs-devel@gnu.org; Tue, 28 Sep 2021 03:21:09 -0400 Original-Received: by mail-wm1-x32a.google.com with SMTP id 205-20020a1c01d6000000b0030cd17ffcf8so1281668wmb.3 for ; Tue, 28 Sep 2021 00:21:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=gQ+yNEH+Q4r3XMch5n+zHMxPE++byD9coAd/20j6pN8=; b=de5L7OGZvTHWYTX51b1kDrfyppXWhuXMZSogzGC4mVuY1l7Fi3Gg1B9CB0ZVVGwPUY 6PvBm5qv3l+d9cgOQRz7QPEwyEsCqIy/qd3sVVvG2sS+ciWeFQU5qIHZ8BCgoMnqHn6n QloxjVi3q4CmU7Blklk6k5dQmLDpget8mhmy9B2U10slRSDs3Rb2Ei1E4pQNkotmp0M9 YSObTIY6Vdrly8+Zu1gV/0hW/NTogBxLP9Dn9JXpA/iCDUwj7TDljycsdEOkyXXZzns9 9G9f+otiPkvQTI3Fi88qFxciJbR+wVMrchT2L26CpFliGYG+JAJSxhpACoMm80G6QxqV BOqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=gQ+yNEH+Q4r3XMch5n+zHMxPE++byD9coAd/20j6pN8=; b=Nk9uGy0V12x1/9/eKan9QTkLynTjzzBRQm172OLs01eSGCFnBmfDxvaEmDOk3rP4hT W7+17crW2qqZT0VPZvj8ice2tiLpXr3GAt7sOm/mxHhe8KLOtSHD+cO4t4WaUxyKLJ+7 tsQ/b53mMXzuFRx3ITfT18MU/MGOtnj7yQAAin1guvsYLNn3nmMxKX9epiGC67b6Hr/p ewPWx0JgwzDru03INnYFegsX1/zK2j2VxxZFiBbhrTvgrxj0L0XTOEXZ+gzvgQqp4fMY wPn3twUTLM+c/eTWKd0ZZ5TftxXmWrOuLXlQ/W4dO/koUBc+THPF0zNPQPYwGEyG+5X2 tUGg== X-Gm-Message-State: AOAM533Mc3XdYKZjX6/o1JAK8FLVH9VQQD7BjXjOFj2r895W3ZL2m06F Cn1m9jtUEqHXx77SFwn2zSpbBygtY2Y= X-Google-Smtp-Source: ABdhPJx3ZcdfgBaADdnYOqgyRYxVJMmngdB85QJ5AREvNVcTetRQUxlNb9Dwh1KH76HwjLIuX9S/OA== X-Received: by 2002:a05:600c:2904:: with SMTP id i4mr3215411wmd.118.1632813664719; Tue, 28 Sep 2021 00:21:04 -0700 (PDT) Original-Received: from krug (a83-132-177-247.cpe.netcabo.pt. [83.132.177.247]) by smtp.gmail.com with ESMTPSA id j7sm22769887wrr.27.2021.09.28.00.21.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Sep 2021 00:21:04 -0700 (PDT) In-Reply-To: <16338bdc2497fc51c6fb6d54ab370bfb@webmail.orcon.net.nz> (Phil Sainty's message of "Tue, 28 Sep 2021 13:38:09 +1300") Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=joaotavora@gmail.com; helo=mail-wm1-x32a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, 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:275661 Archived-At: Phil Sainty writes: > This has probably been covered in earlier discussions (apologies for > not being across those), but... > > Won't this break a ton of basic tooling for locating things, if the > symbol in the file is not the actual symbol? Yes, it will "break" tags, grep, etc and these "dumb" tools. Depends what you mean by "break", however. As a means to find symbols, grep is _already_ broken by the ability to be utilize both "foo" and "foobar" in the source. You simply accept that breakage almost blindly. Even smarter tools are "broken" by (intern (concat "foo" "bar")) in that sense. I wouldn't give up the power of these indirections just to keep grep. But indeed I have to be criterious when I use them. As always, adding expressive power and indirection to a language "breaks" anything that is too tightly coupled to the implementation. For symbols, some tools make assumptions that they are always represented textually by a certain contiguous string in a file. Fortunately, some other tools don't, and IMO those are the most important and valuable ones for dealing with symbols. In these email discussions we use a namespace system, too. We treat each other by first names, like people normally do. I don't type the surnames of people unless they are explicitly participating in the discussion. With that I "break" the ability to grep for the exact Stefan or Phil that I mean. I can still grep for 'Stefan', or 'Sainty' if I want. It'll bring in some false positives. But I wouldn't want to give up the comfort of a first name basis. So it sounds like you're arguing against namespaces in general, and you're right, they have disadvantages, in any language. But the advantages are immense. To organize complex problems utilizing many libraries, I cannot imagine a decent language that does not have them. Jo=C3=A3o PS: Do you know Xref and M-. ? Added around Emacs 25, it's a tool that uses a cross-referencing database that at least in principle shouldn't make those assumptions. It's actually based on a similar tool that I've used in Common Lisp for many years (very complete namepsacing system), and it's been fine. I still use grep for the qualifying part of symbols (the package, the Surname) and for the identifying part (the "first name")