stencilproject / Stencil

Stencil is a simple and powerful template language for Swift.
https://stencil.fuller.li
BSD 2-Clause "Simplified" License
2.34k stars 221 forks source link

Make Context and public methods either open or turn them into a protocol. #200

Open kaygro opened 6 years ago

kaygro commented 6 years ago

This would enable more substantial extensions, without people bothering you about modifications, which aren't really relevant to your project goals. It might also be a good thing to open up the default tags in a similar fashion.

mrackwitz commented 3 years ago

I like this idea, as I happen to need a lazy context at the moment. Either way this will enlarge the public API and so add burden from a maintainers perspective. Subclassing isn't quite en vogue with Swift and tends to be harder to get right. I'd tend towards protocols, if it doesn't complicate things too much. @kylef @AliSoftware @ilyapuchka: Any opinions on that? I'd be open to tackle this. Also open for alternatives, if you have ideas.

AliSoftware commented 3 years ago

\cc @djbe