[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: is requiring cl bad?
David De La Harpe Golden
Re: is requiring cl bad?
Thu, 20 Dec 2012 04:46:41 +0000
Mozilla/5.0 (X11; Linux x86_64; rv:10.0.11) Gecko/20121122 Icedove/10.0.11
On 17/12/12 19:09, Pascal J. Bourguignon wrote:
24.3 finally provides an alternative: `cl-lib' which offers the
same functionality but in a namespace-clean way (i.e. using a "cl-"
This is a silly solution.
The right solution is to implement a package system.
The consistent-prefix approach may be a C-like solution, but is still
noticeably better than the previous conflicty mess, and widely
used for other emacs lisp libs.
But regarding the idea of "a package system" in particular, as you may
mean a system similar to common lisp "packages":
If emacs ever did go toward adding new facilities in the general area of
modularity (however unlikely it is in reality in the near future), I
reckon Ron Garret's common lisp land "lexicons" work  might be a
better "lispy modularity thingy" for emacs lisp to be inspired by than
common lisp packages in particular. At least, I'd take a hard look at
lexicons (and at least glance at what some other languages do), before
just blindly adding common lisp style packages.
Emacs lisp is lexically scoped now after all.
To people coming from quite a few other languages with more
[nowadays-]conventional module systems, lexicons might well seem less
weird than packages.
In emacs lisp land there is obviously no prior usage of common lisp
style packages in the first place (yes I am vaguely aware you can feck
about with non-default obarrays in emacs lisp for some purposes, but
meh), unlike the situation in common lisp land where inertia and compat
concerns will probably keep most people on packages anyway despite the
existence of lexicons there now.
Lexicons are first-class global lexical environments, what are sometimes
called "modules" or "namespaces" in other languages.
instead of mapping strings to symbols, lexicons map symbols to (global)
Re: is requiring cl bad?, Ivan Kanis, 2012/12/17
- is requiring cl bad?, Ivan Kanis, 2012/12/16
- Re: is requiring cl bad?, Xue Fuqiao, 2012/12/16
- Re: is requiring cl bad?, Stefan Monnier, 2012/12/16
- Re: is requiring cl bad?, Pascal J. Bourguignon, 2012/12/17
- Re: is requiring cl bad?, Tony Day, 2012/12/17
- Re: is requiring cl bad?,
David De La Harpe Golden <=
- Re: is requiring cl bad?, Ivan Kanis, 2012/12/20
- Re: is requiring cl bad?, Helmut Eller, 2012/12/20
- Re: is requiring cl bad?, David De La Harpe Golden, 2012/12/21
- Re: is requiring cl bad?, Helmut Eller, 2012/12/21