Arc Forumnew | comments | leaders | submitlogin
2 points by conanite 5416 days ago | link | parent

I don't see how to inject request-scoped variables - it seems you can only call functions in the global namespace. In other words, how would you render

  <span>hello, @(current-user)</span>
for multiple concurrent users?

A separate, and totally subjective, observation: one advantage of having prs all over the place is that output gets sent directly to the client, rather than getting buffered on the server (caveat: depending on how the stream is implemented I suppose). Writing to a string and then printing that string might be more resource-intensive; only an issue for high-volume sites though. The big win I've had with prs all over the place is that when something goes wrong (and arc isn't always very helpful when something goes wrong), you can "view source" in your browser and see where output stopped, and then hopefully make a guess as to where the error is in your code.



1 point by coconutrandom 5411 days ago | link

True and true, current-user would have to be passed to a function to do something with it.

Interesting about buffering the output. Lots to learn still.

-----