Hacker News new | ask | show | jobs
by Zak 6499 days ago
There is nothing special about web development that makes implicit typecasting or returning an arbitrary value when a cast fails instead of raising an exception a good idea. Another reasonable option is to return NaN (Javascript does this) or null.