[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Question about MAKE
- To: info-dylan@cambridge.apple.com
- Subject: Question about MAKE
- From: meehan@src.dec.com
- Date: Sun, 25 Oct 92 20:43:46 -0800
The book says, "Dylan does not specify whether the value returned
must be a newly allocated instance, or whether MAKE is permitted
to return a previously created instance. If a new instance is allocated,
MAKE will call INITIALIZE on the instance before returning it." [page
51]
1. If MAKE returns a previously created instance, this has got to
be something that's no longer visible to the program, right? E.g.,
something that the garbage collector has tossed back into a weak-pointer
pool. As stated, it sounds as though MAKE could return the same
object every time!
2. I expect that INITIALIZE will typically be used to assign non-constant
values to slots, to attach pointers to the new object, etc. If so,
then it would seem to make sense for MAKE to call INITIALIZE even
when it's returning some "recycled" object, no?