Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This sounds like throwing an error with extra steps.

Isn't what you're describing here basically equivalent to saying JS should throw on invalid comparisons, with

    try {if (x) then A else B} catch C
rewritten as

    if (x) then A else B otherwise C

?


Yes, except that the program would continue rather than halt if you left out the OTHERWISE clause. This seemed to me to be more in keeping with the philosophy of the rest of the language.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: