4 ms·
Even PHP has trajectory toward static types. Some examples are Hack[1] and PHP7[2]. Check out the talk Rasmus gave at Etsy[3] for more about PHP7 changes but it
by nerdy 11y ago
Even PHP has trajectory toward static types. Some examples are Hack[1] and PHP7[2]. Check out the talk Rasmus gave at Etsy[3] for more about PHP7 changes but it looks like at least limited support for static or "strict" types (whatever subtle distinction that might be) has enough merit for PHP to implement after all this time.
1. http://hacklang.org/ http://hacklang.org/
2. http://www.php.net/manual/en/migration70.new-features.php http://www.php.net/manual/en/migration70.new-features.php
3. https://www.youtube.com/watch?v=MT4rRWKygq0 https://www.youtube.com/watch?v=MT4rRWKygq0
- captn3m0 11y agoPHP is still a dynamic language. PHP 7 gets us scalar typehinting support, which lets us check types at run-time. There are similar annotation based solutions for Ruby as well, which ultimately rely on a lot of Ruby's metaprogramming features. The idea behind these solutions is to have proper type support where you need it. You will have to pry duck-typing from my cold dead hands if you try to remove it from PHP/Ruby completely.