From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: Proper namespaces in Elisp Date: Thu, 7 May 2020 21:33:19 +0100 Message-ID: References: <87ftcee7td.fsf@tromey.com> <87pnbgzdmx.fsf@tromey.com> <87lfm3290o.fsf@tromey.com> <87ftcb37jx.fsf@t510.orion.oneofus.la> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000033200c05a514cb6a" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="72885"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Tom Tromey , Stefan Monnier , emacs-devel To: Vladimir Sedach Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu May 07 22:34:51 2020 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 1jWnEJ-000Iqg-Pt for ged-emacs-devel@m.gmane-mx.org; Thu, 07 May 2020 22:34:51 +0200 Original-Received: from localhost ([::1]:52064 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jWnEI-00073r-Ta for ged-emacs-devel@m.gmane-mx.org; Thu, 07 May 2020 16:34:50 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45900) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jWnD3-0006HX-Kf for emacs-devel@gnu.org; Thu, 07 May 2020 16:33:33 -0400 Original-Received: from mail-il1-x12e.google.com ([2607:f8b0:4864:20::12e]:33398) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jWnD2-0001iO-1t for emacs-devel@gnu.org; Thu, 07 May 2020 16:33:33 -0400 Original-Received: by mail-il1-x12e.google.com with SMTP id q10so2501794ile.0 for ; Thu, 07 May 2020 13:33:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=CHZYiiyaXfTguHEwnSM3YqK5+XcMY82oZu+g5kMHyv0=; b=KoulUEO8NnYsTs7dY8CvfBWyrcFwVGIzZJYwC4Gvk/zXFtx+nUIRueLvTCQQTvFi/2 Q5fhQjKqNi0zvq1LSP+HkYtquYVN5QY1IOha4gSikThvyO/30jZF4PVdu0qgTzcQ+kOs pciDZiN4NrRBuyQAR08IEMWPw3AMnirejWsccmBx7a0OGw5WWvmd6PqhdGT2lhVZC37U venPFy/sf6awXedyXfF3AR+oa3kYmW9hnwzYtdO4SQs6/YMW5WsGdDMWjgyfVz0VPS35 F47KOupMTlVcs5fcOblnkvmgCXA+RjUeGPdWPitZKKUEj//9mbH9trAtoBy/Sy22ck16 WRzw== 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=CHZYiiyaXfTguHEwnSM3YqK5+XcMY82oZu+g5kMHyv0=; b=TlAn0R8CwIEfnXvQdaRKWjoj8E+0SVl294XzWJiHx8LvNmg5nM/KuxNGAgFHqVmzrT 55Sq6TsZwmwvujRpgoyE5uPSzBkwr+RNQW+8+hfozIT62yvVGkEeeaXSrTjioQD1Z0qt UXb3Ka3YRYys603l4ElV5OvkOtBYhsW0NyXFi3hTOhbA9zgotKpS73hwUudKKu1Oxl1m p1Az8i3bGAnqr4OvmRI63fcGXuSEo3gZyMFV6AnF/kfqlJnZmzXdP5BXqsv6tQCo9XTX 7TsMWBHmZWYOTzH/dVSicHxptVOdk+HVW77b1wLFboDj4qwJSwG1rZ3xtQpXXy7jDgvt osrg== X-Gm-Message-State: AGi0PuZyNoJpNp9lUcJvmR6gcslrSv61k+XGx96kYANNNLXQN0vRpjCe ZL4MkSIW9WAOpOiqMzcdqsxEtI8V5u4VBeix15s= X-Google-Smtp-Source: APiQypJT2Jtdxz07G62fS1cN4f3AXIjX6n+St3EXaHQNvNAH2u3I5f3dUEuzk9VyOTSpSSqVTAqum5vIPpETwHa+qME= X-Received: by 2002:a92:858b:: with SMTP id f133mr14990157ilh.97.1588883610605; Thu, 07 May 2020 13:33:30 -0700 (PDT) In-Reply-To: <87ftcb37jx.fsf@t510.orion.oneofus.la> Received-SPF: pass client-ip=2607:f8b0:4864:20::12e; envelope-from=joaotavora@gmail.com; helo=mail-il1-x12e.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.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, FROM_EXCESS_BASE64=0.979, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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:249217 Archived-At: --00000000000033200c05a514cb6a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, May 7, 2020 at 7:48 PM Vladimir Sedach wrote: > > Stefan Monnier writes: > > >> ;;; Shorthand: (("vl-" . "very-long-prefix-") > >> ;;; ("yalp-" . "yet-another-long-prefix-")) > > > > Adding such "local, read-time prefix remapping" does sound to me like > > the best approach in the context of Elisp, indeed. > > You can do the same thing without breaking grep/TAGS/etc or changing the > reader with overlays and a modified abbrev facility. All namespacing in all languages systems "break" grep if you give grep a volatile namespace qualifier. This just comes with the namespacing. And in your solution the problem then becomes teaches isearch, query-replace and its various variants, a (probably very large) number of tools in the wild about this these overlays. You see "yalp-" then C-s yalp- and find nothing!. Another medium-size annoyance would be alignment and keeping to column limits, like the ones Emacs has. But most crucially: All this started because there are a zillion packages in the wild using s.el. They all invoke its functions with "s-foo". You would ALL need to be massively and intrusively changed and the authors convinced to use your system instead. With my system we can mostly (if not entirely) keep their code untouched, so these files that (require 's) will not know they are actually working with modern-string.el instead of s.el. Jo=C3=A3o --00000000000033200c05a514cb6a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Thu, May 7, 2020 at 7:48 PM Vladimir Sedach <vas@oneofus.la> wrote:
<= blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-l= eft:1px solid rgb(204,204,204);padding-left:1ex">
Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> ;;; Shorthand: (("vl-" . "very-long-prefix-")<= br> >> ;;;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0("yalp-&qu= ot; . "yet-another-long-prefix-"))
>
> Adding such "local, read-time prefix remapping" does sound t= o me like
> the best approach in the context of Elisp, indeed.

You can do the same thing without breaking grep/TAGS/etc or changing the reader with overlays and a modified abbrev facility.

<= /div>
All namespacing in all languages systems "break" g= rep if
you give grep a volatile namespace qualifier.=C2=A0 T= his just comes
with the namespacing.

And in your solution the problem then becomes= teaches isearch,
query-replace and its various variants, a = (probably very large)
number of tools in the wild about this= these overlays. You see
"yalp-" then C-s yalp- and fin= d nothing!.=C2=A0 Another medium-size
annoyance would be alignmen= t and keeping to column limits,
like the ones Emacs has.

But most crucially: All this started because there are a z= illion
packages in the wild using s.el.=C2=A0 They all invok= e its functions
with "s-foo". You would=C2=A0 ALL need = to be massively and
intrusively changed and the authors conv= inced to use your system
instead. With my system we can mostly (i= f not entirely) keep their
code untouched, so these files th= at (require 's) will not know they
are actually working with = modern-string.el instead of s.el.

Jo=C3=A3o




--00000000000033200c05a514cb6a--