Re: Cleaning up the EIEIO namespace
Stefan Monnier <[email protected]> Thu, 14 Feb 2013 17:16:21 -0500
| Newsgroups | gmane.emacs.eieio,gmane.emacs.devel |
|---|---|
| Message-ID | <[email protected]> |
>> Actually, there's a misunderstanding here:
>> - setf was indeed part of CL, but being a macro it was accepted
>> (i.e. you don't need to have it defined at run-time, since it's
>> macro-expanded during compilation).
>> - setf is part of core Elisp in Emacs-24.3.
>> So maybe we don't need oref/oset at all.
> Yes, although I like "(oset foo bar 'baz)" much better than the verbose
> (setf (cl-slot-value foo 'bar) 'baz)
> But I can understand that you want to get rid of it, and package writers
> can still define their own macros/accessors.
I actually don't particular care if we keep them or not, except that if
we keep them, we need to give them a prefix.
> Our problem on the CEDET side is that we want to stay compatible with
> older Emacsen, so we'll need some compat package.
We can either introduce an eieio-compat package full of defaliases, or
do what we did with cl/cl-lib and turn eieio.el into a deprecated compat
package (and introduce a new package eieio-lib to replace it).
>> We could even justify the "cl-" prefix by making cl-lib autoload
>> `cl-slot-value' from eieio.el. Or use the "eieio-" prefix everywhere
>> in eieio*.el and then define "cl-" aliases in cl-lib.el.
> Doesn't that mean that requiring cl-lib would load the full EIEIO
> package?
No, it can be autoloaded, like the definitions in cl-macs, cl-seq, and
cl-extra get autoloaded.
Stefan
------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb