3 ms·
Personally, I can't stand the "lets mix code and markup" style of template systems in general, which includes most templates. I also hated the indentation syst
by papsosouid 15y ago
Personally, I can't stand the "lets mix code and markup" style of template systems in general, which includes most templates. I also hated the indentation system, it just doesn't work well in markup heavy templating. I'm fine with indentation in programming (obviously given that we're talking about haskell), but it drove me nuts in templates as I had to indent far too much, it isn't simple blocks of code being indented, it is "indent everything that is inside something else", which is of course everything.
I found it was just as ugly and awkward as JSP/ASP/PHP, but with the added detriment of forcing me to use indentation where I didn't want it to make it look even less clear, and no closing tags so existing tools look at it and puke. I actually like syntax highlighting. I am atypical I think in that I like zope/lift/heist templates where the template is just pure HTML, and it calls out to "snippets" of code to do anything dynamic. But given the indentation issue, I'd sooner use JSP than hamlet.
- cies 15y ago> Personally, I can't stand [...] I also hated [...] it drove me nuts [...] I found it was just as ugly [...] https://www.google.nl/search?&q=haters-gonna-hate&tbm=isch https://www.google.nl/search?&q=haters-gonna-hate&tb... As explained before in this thread "shakespear-text" is the plain-ERB of Yesod. To unmix code and markup i'd advise simply use you discipline; it's far to handy to use it sparingly but avoid it otherwise. (But that's my opinion) I think your contribution of a tag-based template language (like Snap's Heist, or JSP) integration with Yesod will be well received by the Yesod community. http://hackage.haskell.org/package/shakespeare-text-1.0.0.1 http://hackage.haskell.org/package/shakespeare-text-1.0.0.1 http://www.yesodweb.com/book/shakespearean-templates http://www.yesodweb.com/book/shakespearean-templates
- papsosouid 15y agohttp://ycombinator.com/newswelcome.html http://ycombinator.com/newswelcome.html This isn't reddit, please spare us the memes and +1s. I think the odds of such a contribution being well received are quite low given the hostility to that notion the developers of yesod still display. Given that I can't see any benefit to using yesod, it seems like a waste of time for me to contribute an unwanted template engine to it.
- cies 15y ago> This isn't reddit, please spare us the memes and +1s. Ok. Yr right, point taken. > I think the odds of such a contribution being well received are quite low given the hostility to that notion the developers of yesod still display. Hostility I've never encountered. I think the Yesod is super welcoming contribs (the recent discussion on pipes/conduits being a great example of that). > Given that I can't see any benefit to using yesod, it seems like a waste of time for me to contribute an unwanted template engine to it. Do you mean "can't see any benefit to using yesod" over using Snap? Because I see quite a bunch of benefits in that comparison. Let me name the ones I perceive as benefits: * More type-safe * Write less code to get it done (using template haskell and quasiquoting -- in other general terms they are "small DSLs") * More vibrant community * Faster (Warp is screaming fast) * More like Rails (yups this is an advantage to me as I quite liked Rails for some reasons that Yesod seems to copy)
- papsosouid 15y agoThe hostility is on display right here, just asking how hard it is to use another template engine gets you a "hamlet is the best" response from one of the devs. Your list of benefits is a list of things you like. Telling me what you like doesn't make it so that I also like what you like. Yesod offers no advantages to me, as I would be using it without hamlet and without persistent, making it just an uglier happstack or snap. As I said elsewhere, I am one of the significant number of people who feel yesod's over-use of template haskell and qq is unnecessary and detrimental. It seems to appeal primarily to non-haskellers.
- cies 15y ago> The hostility is on display right here 7+ hours before you posted this an anwser to Agorak's question "how easy is it to switch templating languages?" was kindly given by Michael Snoyman (lead dev of Yesod). http://news.ycombinator.com/item?id=3817124 http://news.ycombinator.com/item?id=3817124 He says: "I don't think anyone's actually done it, because most of our users really like Hamlet. That said, switching should be a piece of cake. All you need to do is [...removed techincal details...]" I cannot find anything that you describe as hostile. I think this whole "hostility" thing you seem to perceive is simply not there. Just friendly open source collaboration for the greater good is what I see.