Live data from Hacker News

Show HN: Polly: A templating language for Rust

gitlab.com

1–10 of 22 posts

Re: Show HN: Polly: A templating language for Rust

#3
It looks like a nice project, but I wonder about the use case. It is limited to HTML output and usage from Rust. Hence, limiting the projects where it can be used.

HTML syntax has its problems, but when you work with the web, you have to know it anyways. Why would I want to deal with yet another syntax? It also means that as a user of the templating system you have to hope that the system can deal with all the quirks that HTML has (e.g.,
in HTML 4,
in XHTML and both in HTML 5).

It would be interesting so see an FAQ that explains where the advantages are over other templating solutions like Handlebars.

Re: Show HN: Polly: A templating language for Rust

#5

It looks like a nice project, but I wonder about the use case. It is limited to HTML output and usage from Rust. Hence, limiting the projects where it can be used. HTML syntax has its problems, but when you work with the web, you have to know it anyways. Why would I want to deal with yet another syntax? It also means that as a user of the templating system you have to hope that the system can deal with all the quirks…

Or just support HAML syntax...

Re: Show HN: Polly: A templating language for Rust

#8
Really, I think Hiccup is the best solution in this space.

Prefer logic-less functions to output html strings? Hiccup has this use case covered. This is all stock Clojure[script], not a templating language:

    (def foo [:h2 "something cool"])
    (hiccup.core/html foo) ;;=> "something cool"
Plus there's plenty of ways to quickly build up a bootstrap (, etc) page.

    (defn bootstrap-page [hiccup-form]
     (hiccup.page/html5 
      (hiccup.page/include-js "link-to-jquery.js" 
                              "link-to-bootstrap.js")
      (hiccup.page/include-css "link-to-bootstrap.css")
      hiccup-form))
BTW, there are some interactive examples at http://hiccup.space

Re: Show HN: Polly: A templating language for Rust

#9
post #5

It looks like a nice project, but I wonder about the use case. It is limited to HTML output and usage from Rust. Hence, limiting the projects where it can be used. HTML syntax has its problems, but when you work with the web, you have to know it anyways. Why would I want to deal with yet another syntax? It also means that as a user of the templating system you have to hope that the system can deal with all the quirks…

Or just support HAML syntax...

Right? Hasn't this wheel been reinvented a gajillion times before.

Re: Show HN: Polly: A templating language for Rust

#10
post #5

It looks like a nice project, but I wonder about the use case. It is limited to HTML output and usage from Rust. Hence, limiting the projects where it can be used. HTML syntax has its problems, but when you work with the web, you have to know it anyways. Why would I want to deal with yet another syntax? It also means that as a user of the templating system you have to hope that the system can deal with all the quirks…

Or just support HAML syntax...

I have to say, my first (and rather uncharitable) thought when I saw this was, "Does the world really need another templating language?" I've been really happy with Haml for years now, and have reached moderate levels of satisfaction with Jade when I can't use Haml.

Also, it wasn't clear to me from looking at https://gitlab.com/Polly-lang/Polly/blob/master/GUIDE.md#var... how I would actually write, say, an email addressing including an "@" symbol (I'm sure it's possible, just not documented there).

Post reply on HN