ISSUE: Limited collection fill REVISION HISTORY: Rob MacLachlan, 18 February 94 STATUS: open RELATED ISSUES: limited types design note CATEGORY: change PROBLEM DESCRIPTION: It would be desirable if generic collection operations like map preserved element type limitations when passed a limited collection. One problem is that although limited collection types are instantiable (via make), they are not classes, so presumably can't currently be returned by class-for-copy. Even if map can somehow get the limited collection type to instantiate, it still can't call "make" on that type, since map can't get its hands on a legal fill: value to allow creation of arrays whose element type doesn't include #f. PROPOSAL: Add a fill: keyword to limited (default #f): limited(, of: , fill: 0.0s0) Change MAKE to use this fill value as a default when creating limited collections. Clarify that CLASS-FOR-COPY can return any instantiable type (not just classes.) AMENDMENT 1: Rename CLASS-FOR-COPY to TYPE-FOR-COPY. RATIONALE: This allows generic collection operations to have the expected behavior on limited collections. EXAMPLES: COST TO IMPLEMENTORS: COST TO USERS: PERFORMANCE IMPACT: Allows efficient limited collection instances to be used as arguments to generic collection operations. Doesn't allocate a worst-case result type. BENEFITS: efficiency, less surprising behavior. AESTHETICS: FUTURE FEATURES: