Ironic that now php7.2 with a very strong typing system, and due to the capabilities of the syntax, refactoring php is on par with refactoring java. With type hinting on php, you can be incredibly strict with return types,
function funcName(int $value): bool {
return $value > 0;
}
Next version of php will have a JIT, then we'll see another major leap in performance, as with async w/ swoole / AMP is already at the same speed or faster than nodejs event-based serving. But has a better native syntax or numerous things. classes, abstract classes, interfaces, traits, anonymous functions , anonymous classes & anonymous class implements <interfaces>. No other scripting / interpreted language is as powerful, typescript doesn't count since it's transpiled. Same with dart, its mostly used as a transpiled language too. Dart to my knowledge was never integrated into chrome.
php7.2 with a very strong typing system... With type hinting on php, you can be incredibly strict with return types
When my eyes first saw >, I thought you were going to say you can specify something like int > $n or at least int > 5 as a type. int and bool are about as basic as you can get. Whatever "very strong" means, I probably wouldn't use that as an example.
What does that have to do with anything? Once your build system is set up, it's irrelevant. I've been using webpack with hot module reloading; the workflow is great.
But [PHP] has a better native syntax or numerous things
Everything you mention (except anonymous functions) are object-oriented. Javascript has a better syntax for functional programming styles.
2
u/compubomb Jun 20 '18 edited Jun 20 '18
Ironic that now php7.2 with a very strong typing system, and due to the capabilities of the syntax, refactoring php is on par with refactoring java. With type hinting on php, you can be incredibly strict with return types,
Next version of php will have a JIT, then we'll see another major leap in performance, as with async w/ swoole / AMP is already at the same speed or faster than nodejs event-based serving. But has a better native syntax or numerous things. classes, abstract classes, interfaces, traits, anonymous functions , anonymous classes & anonymous class implements <interfaces>. No other scripting / interpreted language is as powerful, typescript doesn't count since it's transpiled. Same with dart, its mostly used as a transpiled language too. Dart to my knowledge was never integrated into chrome.