Better HN
topnewbestaskshowjobs
Log inSign up

tig

12 karma · joined Feb 3, 2008 (18y ago) · 2 submissions

Submissions

comment 18y ago · link · parent

Yes, you can create an environment in every language to help you write very short web-apps. I still dont get the point Paul wants to make with his Arc example. Your Ruby solution looks a lot more readable to me. Also my PHP solution, which is here: http://news.ycombinator.com/item?id=108625

Maybe Paul wants to elaborate, what from his point of view the advantages of his ARC example are?

comment 18y ago · link · parent

PHP:

  if ($S['foo']) echo "you said {$S['foo']}";
  elseif (PtoS('foo')) link('said','click here');
  else form('foo');
For me, making programs short is not a design goal. But if it would, I would do it like above. My framework then would include this functionality:

  S[] contains all session variables
  P[] contains all posted variables
  PtoS copies an entry from P to S. Returns false if P was not set.
  link() prints a link
  form() shows a form with the given fields. target is the current url.