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

Check out the templating system:

    <ul c:if="notEmpty(colors)">
        <li style="color: $color" c:for="color in colors">
            $color
        </li>
    </ul>
    <div c:else="">
        No colors!
    </div>
Not sure if that's been done before but I think attaching "display logic" to specific elements in the DOM is interesting.


FYI, when designing the Raptor Templates language I borrowed that technique from the Genshi templating language: http://genshi.edgewall.org/wiki/Documentation/xml-templates....

When the template compiler understands the actual HTML structure of the document the compiler can do some really interesting and smart things that would otherwise be impossible with template compilers that just see the document as text. Personally, I really like how the HTML template has the exact same nesting as the output HTML markup that it produces. To me, making the HTML template look as close to the output HTML markup makes things a lot cleaner and easier to understand.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

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

Search: