Google+ Followers

donderdag 24 juli 2014

To BC or not to BC?

A few weeks ago there was a vote to change the behavior of PHP.

This change has the ability to break existing code, so obviously some people are in favor and some are against.

Those who vote for the change see an opportunity to make their code more consistent and therefore faster to debug and more reliable in the long term.

Those who vote against see a lot of debugging work when the change is applied, with minimal benefits for the future.

As you may have guessed, I am a proponent of any change that makes a language more consistent. I adore Python for it's attitude of "you only need one way to do something, so that's all you get" and I love languages that use strict typing, specifically because it prevents this kind of problems
Do the BC protesters have a point? Absolutely, but they are making the point from deep down a hole that they dug for themselves, while furiously shoveling "straight down". If your codebase grows to the size where you have to worry about changes in behaviour in PHP then you have a responsibility to yourself to write tests. Today's development tools are such that writing tests hardly takes any extra time and it completely voids this "Ohnoes, don't change PHP or my code will break!" argument.

So yes, please PHP, become more consistent. Incorporate HHVM while you are at it, and become a real programming language.