[web-devel] proposal for hamlet-like syntax that is more compatible with html

Alexandros Salazar nomothetis at gmail.com
Sat Dec 11 17:17:37 CET 2010

My belated 2c (sorry, work has been keeping me away from things Yesod and

1. The key reason I switched to Yesod was Hamlet. I'm very new to Haskell,
and I wanted to try developing a webapp in it; when I looked at the various
frameworks, my main question was "What will require me to learn the least
new stuff, while still giving me a full Haskell-based development
experience?" Yesod was the answer, because I was already familiar with Haml.
So, it is one less thing a large swath of people need to learn when they
decide to give Yesod a try. And at least in my case, it was a deciding

2. I'm not convinced closeness to HTML is a design goal. My experience is
again limited, but I wouldn't expect many people to switch existing projects
to Yesod (or really, from any framework to any other); therefore, the idea
that someone will have a bunch of HTML to be converted as simply as possible
to whatever templating language we use seems remote.

3. Along the same lines, the reason for the existence of templating
frameworks like Haml and Hamlet is precisely that people don't enjoy writing
HTML: why would we constrain ourselves by similarity to something people
have put large (and creative) amounts of effort into avoiding? I think it is
unduly limiting.

4. I do believe there are some issues with Hamlet; in fact, the issues
raised by Greg are exactly the issues I have. I don't see having a
Yesod-specific templating language as the solution, unless this new syntax
gives Yesod such a big productivity boost compared to using Hamlet that it's
worth putting in the effort.

In brief, I think Hamlet is 95% of the way there, and that Michael has done
a great job with it. It seems easier to take it another 4% and get it to 99%
than it would be to rewrite the syntax from scratch. I don't view HTML
similarity as a bonus (or a malus, either way). Maintaining (and furthering)
similarity with Haml seems worthier goal, given how many people use it, are
familiar with it, and love it; it will ease adoption.

I hope this all made sense, and that I didn't start an argument about bike
shed colors... ;-)


On Sat, Dec 11, 2010 at 10:48 AM, Michael Snoyman <michael at snoyman.com>wrote:

> Alright, at this point I've only heard positive things about this
> syntax change. Does anyone want to volunteer to try and tackle this,
> or will this need to wait till I can get around to it? Fair warning:
> I'm likely to try to deal with the WAI + enumerator and xml-enumerator
> tasks first. If someone wants to take a crack at the Hamlet changes,
> I'll be happy to review things.
> Michael
> On Sat, Dec 11, 2010 at 2:38 AM, Simon Michael <simon at joyful.com> wrote:
> > I support this proposal's goal, and would be fine with rewriting my
> > templates.
> >
> >
> > _______________________________________________
> > web-devel mailing list
> > web-devel at haskell.org
> > http://www.haskell.org/mailman/listinfo/web-devel
> >
> _______________________________________________
> web-devel mailing list
> web-devel at haskell.org
> http://www.haskell.org/mailman/listinfo/web-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/web-devel/attachments/20101211/1d41e534/attachment.htm>

More information about the web-devel mailing list