Arc Forumnew | comments | leaders | submitlogin
1 point by lojic 6169 days ago | link | parent

I do agree that small samples can be instructive when comparing languages (although I'm getting tired of seeing quicksort in Haskell :), but I think some slight tweaks would make this much more compelling:

1) Some simple validation on the input field. Ensure something was entered, and ensure it conforms to some pattern. Notify the user of invalid input and request it to be reentered instead of going to the second page.

2) Some facility for placement/presentation. If you're depending totally on CSS for presentation, that's fine, but at least give the poor designer some ids/names to work with.

3) Produce valid html that passes:

http://validator.w3.org/check

Having said that, I do think it's a great example of conciseness, and it has caused me to think about adding some Ruby functions to make my Rails development more concise. Not quite ready for continuations though.