Just because something is being used widely does not make it right, nor should it be held up as a fine example of design.
Language hacks like the one we're discussing are fine IF:
- You work with people who avoid bad features.
- You can avoid using code that uses bad features (less of a problem, until you have to debug things and then you're in a world of hurt).
- The features are not short-sighted hacks that prevent the language from moving forward (e.g., eliminate the opportunity to make things faster through dynamic compilation or whatever).
Scheme is a great language that is not useful in the real world, while PHP is a terrible language that happens to be in wide use. Neither of these positions are unique, and honestly I'd much rather use a bad language with good tooling than a great language with poor support. But I will continue to point out PHP's flaws, which are many and just howling bad, and work towards improving the alternatives.
Exactly, what's wrong with a double clawed hammer?
Use it or not, if you don't like it you can smash stuff with the triblade screw driver. Or the 7 point socket wrench.
PHP provides a wealth of very useful tools that you can choose to use or not. I don't know why people think my 7 point socket wrench is dumb, it works quite well to round the edges of 6 sided bolts and saves a lot of money on buying those special bolts that can't be removed once tightened.
It really doesn't. Especially when you see people pulling out the double claw hammers at your company.
Features that have limited real benefits with lots of risk get abused all the time. They are the retarded tools of the world creating technical debt for everybody else and they should be retired.
Extract is one of the stupidist language feature conceived precisely because it puts something so ripe for abuse into the hands of idiots. It even has a simple name that practically encourages its abuse.
Since when is Scheme the arbiter of what is good or bad?
PHP lets you do this, or not do this, your choice. Like C, PHP doesn't tell you what to do, it's up to you.
That's why people actually use it.