generics-implementation

Solid

Expert skill for implementing parametric polymorphism including type parameter bounds, monomorphization, type erasure, variance, higher-kinded types, and associated types.

AI & Automation 814 stars 53 forks Updated today MIT

Install

View on GitHub

Quality Score: 95/100

Stars 20%
97
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Generics Implementation Skill Implement parametric polymorphism for programming languages including generics, type bounds, and compilation strategies. ## Capabilities - Design generic syntax and type parameter bounds - Implement monomorphization (Rust-style) - Implement type erasure (Java-style) - Handle variance in generic types - Implement higher-kinded types (if applicable) - Design trait/interface bounds - Handle associated types - Implement generic method dispatch ## Usage Invoke this skill when you need to: - Add generics to a language - Implement monomorphization or type erasure - Design trait bounds and constraints - Handle variance and subtyping with generics ## Inputs | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | compilationStrategy | string | Yes | Strategy (monomorphization, erasure, dictionary) | | features | array | No | Features to implement | | varianceModel | string | No | Variance handling (explicit, inferred, none) | | boundsSystem | object | No | Bounds system configuration | ### Compilation Strategies ```json { "compilationStrategy": "monomorphization", // Rust, C++ "compilationStrategy": "erasure", // Java, TypeScript "compilationStrategy": "dictionary" // Haskell, Swift witness tables } ``` ### Feature Options ```json { "features": [ "type-parameters", "trait-bounds", "associated-types", "variance", "higher-kinded-types", "default-type-paramet...

Details

Author
a5c-ai
Repository
a5c-ai/babysitter
Created
4 months ago
Last Updated
today
Language
JavaScript
License
MIT

Related Skills