Skip to content

Fix F# style guide: remove LINQ, add missing patterns#64

Merged
0101 merged 1 commit intomainfrom
update-docs
Apr 21, 2026
Merged

Fix F# style guide: remove LINQ, add missing patterns#64
0101 merged 1 commit intomainfrom
update-docs

Conversation

@0101
Copy link
Copy Markdown
Owner

@0101 0101 commented Apr 21, 2026

Problem

The F# style guide in AGENTS.md referenced LINQ — a C# concept that doesn't belong in F# guidance. Additionally, comparing with the more recent offpilot AGENTS.md, several concrete F# anti-patterns were missing that LLMs commonly get wrong.

Changes

  • Removed LINQ reference — "restructure with LINQ/higher-order functions" → "restructure with higher-order functions"
  • Added 4 missing patterns to the style guide:
    • Immutable collectionsMap, list, Set over Dictionary<>, ResizeArray, List<T>
    • String interpolation$"text {x}" over sprintf
    • Modern indexingcollection[0] not collection.[0] (dot-bracket obsolete since F# 6)
    • CSS over inline stylesprop.className + CSS classes, not style.* in Feliz views

These are the most common C#-isms that AI code generators default to when writing F#.

- Remove C#-ism: LINQ reference in 'break/continue' guidance
- Add immutable collections: Map/list/Set over Dictionary/ResizeArray/List<T>
- Add string interpolation preference over sprintf
- Add modern indexing syntax (no dot-bracket)
- Add CSS-over-inline-styles guidance for Feliz views
@0101 0101 enabled auto-merge (squash) April 21, 2026 15:49
@0101 0101 merged commit f5257a6 into main Apr 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant