Skip to content

Phantom type parameters for Dictionary and Array #2

@reinerp

Description

@reinerp

In my CoreFoundation package, I give phantom type parameters to Array and to Dictionary representing the types of values they store, so the types are Array a and Dictionary k v.

While some CoreFoundation routines will just return Array Object (which is no more useful than CoreMac's Array), property lists are notable in having more useful types: their arrays and dictionaries are always Array Plist or Dictionary String Plist.

As a test, I integrated this design into CoreMac; see 1, 2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions