Hacker News new | ask | show | jobs
by fiedzia 3537 days ago
This will most likely break a lot of existing code. Even if it works, it means I'll be parsing text to figure out what exactly happened (exception not only signal "that something happended", but also "what exactly happened". In languages that use them properly that is). Third, nobody does it. Most importantly, stdlib doesn't do it. All of does make PHP bad for me.
1 comments

It it will break BC, then don't use it? You guys are using every dirty trick invented for internet discussions in the last 30 years. You said it dosen't exist. When I showed the way to get it, the agrument should stop this very instant.

Instead you started nitpicking on the solution. That's dishonest. And it makes the discussion endless.

> Third, nobody does it.

This statement of yours clearly states that you have no idea of the actual PHP ecosystem. Every single major PHP framework is routinely doing it.

> It it will break BC, then don't use it?

So the choice is between insane behaviour, or breaking the code.

> Instead you started nitpicking on the solution. That's dishonest. And it makes the discussion endless.

Because the problem is unsolvable. You cannot get PHP to behave sanely unless you redo everything it does. If you fix one thing, dozens of other will fall apart.

>Every single major PHP framework is routinely doing it.

Right, I wasn't aware of this. How do you write libraries for PHP than, you choose between using what's in stdlib as it is and being used within a framework where exceptions are thrown? Support both? Ignore the problem? Or every library makes its own choice how stdlib should behave? Do the frameworks convert strerr and errno into something usable?