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 1,160 stars 71 forks Updated today MIT

Install

View on GitHub

Quality Score: 96/100

Stars 20%
100
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

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Solid

128-java-generics

Use when you need to review, improve, or refactor Java code for generics quality — including avoiding raw types, applying the PECS (Producer Extends Consumer Super) principle for wildcards, using bounded type parameters, designing effective generic methods, leveraging the diamond operator, understanding type erasure implications, handling generic inheritance correctly, preventing heap pollution with @SafeVarargs, and integrating generics with modern Java features like Records, sealed types, and pattern matching. This should trigger for requests such as Improve the code with Generics; Apply Generics; Refactor the code with Generics. Part of cursor-rules-java project

393 Updated today
jabrena
AI & Automation Solid

typescript-advanced-types

Master TypeScript's advanced type system including generics, conditional types, mapped types, template literals, and utility types for building type-safe applications. Use when implementing complex type logic, creating reusable type utilities, or ensuring compile-time type safety in TypeScript projects.

36,222 Updated today
wshobson
AI & Automation Solid

pattern-matching

Expert skill for implementing pattern matching including exhaustiveness checking, decision tree compilation, and efficient match dispatch code generation.

1,160 Updated today
a5c-ai
Data & Documents Listed

typescript-advanced-types

Master TypeScript's advanced type system including generics, conditional types, mapped types, template literals, and utility types for building type-safe applications. Use when implementing complex type logic, creating reusable type utilities, or ensuring compile-time type safety in TypeScript projects.

22 Updated 6 days ago
HermeticOrmus
AI & Automation Solid

type-theory

Expert skill in type theory foundations for implementing type systems including inference, checking, and subtyping

1,160 Updated today
a5c-ai