From: Lars Magne Ingebrigtsen <larsi@gnus.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Richard Stallman <rms@gnu.org>, emacs-devel@gnu.org
Subject: Re: lexicons
Date: Wed, 31 Jul 2013 12:27:25 +0200 [thread overview]
Message-ID: <m3y58nm3ci.fsf@stories.gnus.org> (raw)
In-Reply-To: <jwvk3k7tnuy.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Tue, 30 Jul 2013 23:47:58 -0400")
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> So maybe the solution is simply to provide prefix shorthands.
> Chose a "prefix char" (there's a good time for bikeshedding here), let's
> say | for now. Then you could define (file-locally):
>
> prefixes-alist: '(("" "mypackage-") ("gs" "gnus-summary-"))
>
> and then use `|foo' as a shorthand for `mypackage-foo' and `gs|bar' as
> a shorthand for `gnus-summary-bar'.
That's a lot less typing and reading, but I feel that having several
ways of denoting the same thing makes reading the code more difficult.
Common Lisp has the concept of package nicknames, so you'll call the
package `something-very-long-indeed', and have a nickname like `si'. So
you're reading the code, seeing `si:bar', and you have to either know
what it's a nickname for, or look it up at the package definition. And
when you get a backtrace, it'll talk about
`something-very-long-indeed:bar', which doesn't match up with the code
you're reading. So I've stopped using package nicknames in Common Lisp.
I think the prefix concept may have the same problem.
(And we'd have to extend etags etc to parse this stuff, but that's
perhaps a minor issue.)
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
next prev parent reply other threads:[~2013-07-31 10:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-30 21:55 lexicons Richard Stallman
2013-07-31 3:47 ` lexicons Stefan Monnier
2013-07-31 10:27 ` Lars Magne Ingebrigtsen [this message]
2013-08-01 21:46 ` lexicons Stefan Monnier
2013-08-01 21:57 ` lexicons Lars Magne Ingebrigtsen
2013-08-02 4:53 ` lexicons Teemu Likonen
2013-08-02 5:00 ` lexicons Lars Brinkhoff
2013-08-02 12:25 ` lexicons Lars Magne Ingebrigtsen
2013-08-02 6:41 ` lexicons Bastien
2013-08-02 13:50 ` lexicons Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3y58nm3ci.fsf@stories.gnus.org \
--to=larsi@gnus.org \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=rms@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).