Skip to content

Conversation

@riezebosch
Copy link

@riezebosch riezebosch commented Aug 19, 2025

suggestion for a clean solution to infer the source type by splitting the setup into two steps, fixes #25

It also opens a nice API for bundling more methods on a builder instead of overloading all types with extension methods (like AwesomeAssertions vs Shouldly)

@Tim-Maes
Copy link
Owner

Tim-Maes commented Nov 7, 2025

Few reasons I don't really like this:

Facet is doing transformations, not construction. Fundamentally different
Type inference as is now, always works. Builder doesnt' improve this.
This extension adds a ToFacet()... to every single type in the codebase
Every call allocates a Builder object just to call one method on it.

Going to close this PR now, sorry for the delayed response. Thanks

@Tim-Maes Tim-Maes closed this Nov 7, 2025
@riezebosch
Copy link
Author

the ToFacet extension is already added by the original source code to every single type in the codebase, right? https://github.com/Tim-Maes/Facet/blob/master/src/Facet.Extensions/FacetExtensions.cs#L62

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.

[Enhancement] Removing the source when using .ToFacet()

2 participants