What problem does it solve?
This Skill provides a comprehensive guide to writing clean, functional F# code, addressing common pitfalls and promoting best practices.
Core Features & Use Cases
- Functional Thinking: Emphasizes immutability, total functions, and pattern matching over OOP-style constructs.
- File and Module Organization: Offers guidelines for project file ordering, module usage, and namespace considerations.
- Single-case DU Discipline: Detailed instructions on creating single-case DUs for type safety and domain modeling.
- Pattern Matching: Encourages the use of pattern matching over if-else structures for better code clarity.
- Active Patterns: Introduces active patterns for parsing and validation.
- Computation Expressions: Explains the use of computation expressions for creating custom DSLs.
- Task vs Async: Offers guidance on when to use
task and async for asynchronous programming.
- Records and Updates: Details the use of immutable records and the
with syntax for updates.
- Error Handling: Discusses the use of
Result and Option for error handling.
- Naming Conventions: Provides a set of naming conventions for F# code.
- Anti-patterns: Lists common anti-patterns to avoid in F# code.
- Type Provider Authoring: Offers guidance on writing Type Providers, including the call-site style.
Quick Start
Load the fsharp-style skill to review your F# code or when considering a new feature implementation.