News for hackers. Stuff that matters.
Re:Fun - a new programming language for the realtime web by marcuswestin on Monday August 09, 2010 @03:35PM (#1589087)
Absolutely!

You can declare something akin to a function, which takes arguments and emits HTML. Imagine e.g.

    let taskTemplate = template(task) {
         <div class="task">
              <span class="title">task.title</span>
         </div>
    }

    for (task in tasks) { taskTemplate(task) }
I'm not decided on syntax yet.

You can definitely separate out logic from template this way.

Fun outputs javascript, not HTML - the javascript then builds the DOM.

Re:Fun - a new programming language for the realtime web by m0th87 on Monday August 09, 2010 @05:41PM (#1589514)
But it still outputs something that is only consumable by web browsers. It seems to me like the potential productivity gains you'd get out of Fun would only be for tightly coupled systems where you're not worried about exposing an API, and all clients use web browsers.
Re:Fun - a new programming language for the realtime web by narcvs on Tuesday August 10, 2010 @01:03PM (#1592203)
Web browsers are not so "only" :) pretty good platform to start with if you're going to pick one
Re:Fun - a new programming language for the realtime web by m0th87 on Wednesday August 11, 2010 @10:41AM (#1594827)
Yes but not a great platform to get locked into. What if tomorrow your client asks for a native iPhone app?