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 16:20:37 +0100 Message-ID: <87tui4d8vu.fsf@gmail.com> References: <16338bdc2497fc51c6fb6d54ab370bfb@webmail.orcon.net.nz> <87ee99dv34.fsf@gmail.com> <07cf50ddddb5a9556aa94201a7ac88c9@webmail.orcon.net.nz> <13419e1a-d257-2a94-baaa-dcb555ec8619@yandex.ru> 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="10960"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Phil Sainty , emacs-devel To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Sep 28 17:22:12 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 1mVEvr-0002Z1-Fc for ged-emacs-devel@m.gmane-mx.org; Tue, 28 Sep 2021 17:22:11 +0200 Original-Received: from localhost ([::1]:45612 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mVEvp-0003NU-Jl for ged-emacs-devel@m.gmane-mx.org; Tue, 28 Sep 2021 11:22:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48228) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mVEuP-0001xH-T9 for emacs-devel@gnu.org; Tue, 28 Sep 2021 11:20:43 -0400 Original-Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]:51188) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mVEuN-0002B2-Pr for emacs-devel@gnu.org; Tue, 28 Sep 2021 11:20:41 -0400 Original-Received: by mail-wm1-x332.google.com with SMTP id j27so3814849wms.0 for ; Tue, 28 Sep 2021 08:20:39 -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=XT0/gXi+9TO2S+ffFUh2Sch23JshRH2xxLEduOIKMyg=; b=bRMeoPOqNOW/KrxRRpalipDpuJdqGLetiJdnqMu1NN7i2NHVKVhPNkZVWto+QRbcf7 y2EEvSlYPprpcRzYuNscZdBGL3+zGa621ZDAmvhnEW2ijUR5Pd2IriJG419no4aXaVQu J8wO/LmmN/qGJPkK8gabNCCyHLWgMPTnUop/1rBzvSWc3TE4JGOaRJUkcGaFVGunykq2 3idPa6Pb+tk6C2j7GpolXJqa329AUdru8slKT1Ef93TdPlt/LvVlyZtffHeH7SflQ8ic XfBROWz3IhCukdeir9nf8V6sAao5lBBw52JMyfJUB+N+w9sp5XoT1xq+kNn42CDkg0cQ nteQ== 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=XT0/gXi+9TO2S+ffFUh2Sch23JshRH2xxLEduOIKMyg=; b=mK6p3zHWq3OlKbD+CW9bBuYejvbH6W8UMQRYpBf8GanZbS58H9FMZJDGHVDkNg442Q cTvJ9IBY9Y9T4TXEPOkwqkrsXJIbWTnYbdcm8V27AVNE8iOYv/3bdlAWWJvZXoRG67pJ pMBgUr5HsvtL1t8rKmuR2nxFsPt5q3QLcz784uEO8tVmAIPL8bQaaInGpoJQgqRW8n/v GcCfB2GFVMFfypeZsby2fEG8VISB04T1SkWiNBZLY0yXsnHRUEW9J5ieLFHCD/f8OihF IpQdIlP1OBlOa7U0tSYaOja7llptVv2VvEg6laScn4L2/uV89CPUjNdF+JWf6SY+s2qB zMwQ== X-Gm-Message-State: AOAM531dLRTvgaqY4gWs3rTUNGCFPo9/IApgM4WGdpeiHW8FY5Y8oBLO 6qDtENejZDWUt7QEdNtqf6FxmGIgf7U= X-Google-Smtp-Source: ABdhPJzAJLljlssU96Ielq8O+zZKkTBV0uPsr8pGNXvxWqHi3Asg2A3mc+b1Y3q2Zbxok2cnTgyUwg== X-Received: by 2002:a7b:c314:: with SMTP id k20mr5346424wmj.50.1632842437399; Tue, 28 Sep 2021 08:20:37 -0700 (PDT) Original-Received: from krug (a83-132-177-247.cpe.netcabo.pt. [83.132.177.247]) by smtp.gmail.com with ESMTPSA id v20sm20201217wra.73.2021.09.28.08.20.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Sep 2021 08:20:36 -0700 (PDT) In-Reply-To: <13419e1a-d257-2a94-baaa-dcb555ec8619@yandex.ru> (Dmitry Gutov's message of "Tue, 28 Sep 2021 16:08:13 +0300") Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=joaotavora@gmail.com; helo=mail-wm1-x332.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:275699 Archived-At: Dmitry Gutov writes: > On 28.09.2021 15:49, Phil Sainty wrote: >> Allowing things to not be what they seem adds an additional cognitive >> load to *everything* you look at, because everything has the potential >> to not be what it seems, and so I think this makes codebases harder to >> read and understand, generally. > > Perhaps we could alleviate this by requiring that shorthands end with > a particular character (like '/' or ':'), so that if you see it in a > name, it's probably a shorthand. I think that's a dreadful idea. The point of shorthands is aiding typing and manage namespacing etiquette succesfully. Your proposal would single-handedly destroy the ability to import s.el and s.el -using libraries with minimal changes, for example, which was one of the main motivations for writing it. If however, you substritute "requiring shorthands to end" with "visually annotating" shorthands, such as with font-lock, for example, then I think that's a pretty good idea that should solve the "cognitive load" bit. We already do that with macros, functions, variables, uninterned symbols, why not shorthands, indeed. It's super consistent. Jo=C3=A3o