3 ms·
There is no template. That is the code. All of it. I do not think it is hard to follow at all. Definitely easier than your Lua code. It translates right into t
by jules 16y ago
There is no template. That is the code. All of it.
I do not think it is hard to follow at all. Definitely easier than your Lua code. It translates right into the description of what it's doing:
On the page '/said' display the following:
A form containing:
an input box named message
a submit button that goes to the following page when clicked:
a link with text "click me", that goes to following page when clicked:
a text saying "You said #{message}"
The problem you have with it is likely that it seems too simple. You're looking for additional code that isn't there. This way of coding with continuations as in Arc and in my snippet has many problems, including scalability, memory usage and bookmarking urls, but simplicity or understandability isn't one of them.
- chipsy 16y agoIf it doesn't scale(for some definition of scaling - features, server load, etc.) and you have to rewrite it, it's still essentially hard to follow, because you will have to reconcept the entire system, and presumably stay data-compatible. Zed simply advocates that you ignore toy systems if they don't give you an in towards writing a real app later.
- jules 16y agoI disagree. Something can be easy to understand even if it doesn't scale well. Bubblesort is easy to understand, even though it doesn't scale well. If Zed's claim was that it doesn't scale he should (and would) have written that, instead of writing that it's hard to read.