Programming/Coding, Science

PHP 7: Scalar Type Declarations

One of the reason why PHP7 is actually a wall breaker of old PHP that leads to no more an ‘insane’ programming language for web development. Sure, the backward compatibilities and the baggage it brings are still there, but we need to understand that every language sucks for supports backward compatibilities.

It causes the designers/developers/community of the programming language generally enforce innovations much slower compared to others that are in their infancy or adoption phase. However, we cannot deny that backward compatibilities are also important for code reuse and that saves a lot of time and cost.

Old code works, so why reinvent the wheel? Anyway, what does this scalar type relates to backward compatibilities? Nothing, but it relates to the ecosystem of the PHP . Instead of redesign the whole language, the developers introduces several features for PHP 7that help the developers on programming a better quality with stricter typing features.

For anybody that tried Perl 6 and Golang gradual typing or Python’s type hints with mypy code analysis tool, you’ll find that PHP is not left behind as what the others has said about the language that they’ll probably use around last 14 years ago.

Programming/Coding

Which programming language to use when solving a problem in specific domain?

Perl


Unix/Linux scripting, system administration, one liners and command line utilities.

Python


Science, mathematics, machine learning, Raspberry Pi, web development, desktop applications, and command line utilities.

PHP


Simple to medium-sized and agile web development.

Bash


Bourne shell replacement, simple unix scripting, and used when no better language implementations available.

Clojure


Exploratory programming and practical JVM language.