Skip to content

Conversation

@alexpasmantier
Copy link
Contributor

@alexpasmantier alexpasmantier commented Jun 3, 2025

Having put a bit of thought into how to use this with television, I felt like this would be a more natural and intuitive interface for the lib.

The Template becomes the god-object and is the only thing exposed to the end user which makes it clearer for the user - in my view - what's happening (with Template::parse and Template::format being the only public entrypoints).

This also enables hiding things such as StringOps etc. which I believe the user doesn't need to be aware of.

Other nice thing is the user can now parse a template once and keep it lying around to format any number of strings (typically television's usecase).

Don't hesitate if anything's unclear,
Cheers,

And again, great work on the project!

PS: added a bit of documentation, feel free to update/remove that if you don't believe it's worth it.

@alexpasmantier alexpasmantier force-pushed the create-template-object branch from 9d6168c to 6e4b603 Compare June 3, 2025 23:48
Copy link
Owner

@lalvarezt lalvarezt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, much better now TBH. thanks

@lalvarezt lalvarezt merged commit 378fdc4 into lalvarezt:main Jun 4, 2025
4 checks 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.

2 participants