Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> And templating is more of a PoC for coroutines in Go than a properly fleshed out library.

I worked with Rob on that library and that's really not the case. It was designed from the ground up to replace the existing template library which was bad in several ways. The parser (which is I think what you refer to) is just an implementation detail.



> I worked with Rob on that library and that's really not the case. It was designed from the ground up to replace the existing template library which was bad in several ways. The parser (which is I think what you refer to) is just an implementation detail.

Right, but why can't I call define custom operators? And why is there no bracketing in conditionals? It just feels clunky to me (but maybe I'm too spoiled with Jinja2). I still feel like you could allow execution of functions passed in the data argument (as long as the developer doesn't shoot themselves in the foot, it shouldn't be a security problem).

It's stuff like that which makes me feel like it was a PoC (or at least, not designed to be feature-complete). Still, it works pretty well for plenty of usecases (I use to generate config files every once in a while).


> I still feel like you could allow execution of functions passed in the data argument

I don't recally anyone asking for this before. File an issue? https://golang.org/issue/new

> It's stuff like that which makes me feel like it was a PoC (or at least, not designed to be feature-complete).

It's designed to be a useful template engine. I don't know about "feature complete", but we are still improving it. If you find it lacking then please file issues so that we can think about improving it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: