Hacker News new | past | comments | ask | show | jobs | submit login

Having number_format in so many thousands of places across so many products is indicative of pretty poor code. If you have bad code, you can hardly expect to be able to upgrade to new versions of the language seamlessly.

Speaking of which, are they going to upgrade to 5.3 without testing all those thousands of places across all their products?




How is that indicative of bad code? That seems like a very big jump to make. If you're using PHP at the presentation layer you are probably doing a lot of this. Why would you write some sort of abstraction around number formatting when there is an abstract function to just do it for you?

This is particularly true if your applications are older and written before modern template systems made it a bit easier to abstract these concepts to filters and the like.


I'm just saying it's a sign, or a smell.

Just as you say older/pre-modern -- bad code or not, the same caveat applies about upgrading core language platforms. Even a strictly typed language with a much more standardized API like Java can be hard to upgrade major versions (where I would consider 5.3 a new major version).


It's bad code alright. But I would argue that any code you write in a bad language turns into bad code, no matter how you do it. It might be good enough for your application, so that's fine. But it would be bad nonetheless. And PHP is not a sane language by any measure. So here we have a bad code author dealing with it's bad languague's shortcomings and expecting that they be solved by the very people who created said bad language in the first place. Quite entertaining.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: