[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: type-for-copy
Gabor Greif wrote:
> Doug Hockin wrote:
>
>>Why is there a type-for-copy function but not a type function?
>>If there were a type function how would it be different
>>than type-for-copy?
>>
>>I hope this isn't a total stupid question.
>>
>>-- Doug
>
> ... the function you are looking for is \object-class.
>
> When creating a new instance, the type supplied to make matters. This is why we have
> type-for-copy.
In particular, type-for-copy "[returns] an appropriate type for creating
mutable copies of its argument." -- see
<http://www.gwydiondylan.org/drm/drm_101.htm#MARKER-2-1693>. Maybe it
should really be called type-for-mutable-copy, since you may want to
(and can) make immutable copies of things (e.g., see copy-sequence
applied to <ranges>:
<http://www.gwydiondylan.org/drm/drm_102.htm#MARKER-2-1796>).
HTH,
Hugh