Hacker News new | ask | show | jobs
by sneak 3196 days ago
Wouldn't it make more sense to take the parts of the PHP runtime environment that enable rapid prototyping and figure out how to implement them in a language that has a working == operator rather than trying to graft type safety on a language that has both strpos() and str_rot13()?

Remember BML, bradfitz' attempt to do this with Perl?

I would love to see someone do something similar for Python.

1 comments

> a language that has a working == operator

== has always been working in PHP. I know maybe that optional type coercition trips up some noobs occasionally before they made any effort to learn the language (hint === doesn't coerce types for equality), but how low effort does a complaint have to be?

Type coercition is actually pretty cool when you're not really sure what the browser or client is about to http at you and you just want it to work. It's much better than crashing at runtime because '12' isn't a number. If you're input isn't sane, throw an exception or use a validation library.

Now if we're talking about a good type system that can be enforced at compile time like rust, Scala, etc. Sign me up. But if it's run time, it's run time, we gotta keep going.

> It's much better than crashing at runtime because '12' isn't a number.

something something yell at you for breaking their door