A few issues in EIEIO
Przemysław Wojnowski <[email protected]> Sat, 29 Nov 2014 11:26:20 +0100
| Newsgroups | gmane.emacs.eieio |
|---|---|
| Message-ID | <[email protected]> |
Hello everybody,
While learning EIEIO I've encountered the following issues:
1. 'describe-class' docs says:
"(describe-class CLASS &optional HEADERFCN)
Describe a CLASS defined by a string or symbol.
If CLASS is actually an object, then also display current values of that object."
So, the second sentence says that the argument can be an object, and then the
function will display values of that object, right? But the following gives error:
ELISP> (defclass point ()
((x :initarg :x
:type number)
(y :initarg :y
:type number)))
point
ELISP> (let ((p (point "a point" :x 1 :y 2)))
(describe-class p))
*** Eval error *** Wrong type argument: symbolp, [object point "a point" 1 2]
Am I missing something?
2. Why constructor functions have instance name as required parameter?
According to the info doc it's for debugging purposes:
"Each instance is given a name, so different instances can be easily
distinguished when debugging."
But it's such a rare case and providing a name for every object makes
constructors just impractical. When someone needs to name things for debugging
purposes he/she can easily add a slot for such purpose.
3. Why EIEIO has dependency on Speedbar (eieio-speedbar.el)?
EIEIO is on language level and Speedbar on GUI level, so both are in completely
different worlds - it's like having dependency from JDK to Eclipse. This
dependency makes all programs that use EIEIO (OO system) to depend on Speedbar,
which they may not need.
If a class wants to have Speedbar support then Speedbar should provide helper
classes, not EIEIO.
Hope you don't get it wrong (as an attack), but as constructive critique. After
all, EIEIO is great piece of software.
Cheers,
Przemyslaw
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk