|
"Because, why not?" OK, I'll bite. What follows is devil's advocacy, so be warned. On the whole, it would be better for the world if you wrote something that provided either novel functionality or improved functionality over the existing code. A poor man's sed in PHP is not really very useful, unless there's some way in which your version is going to be better for users - faster, more reliable, easier to use (though the latter could be achieved by wrapping sed in a nicer interface). Secondly, the people most likely to use such a program are PHP developers who aren't aware of sed. They would probably be better served by being told how to use sed rather than thinking that they have to use the PHP ghetto version. Knowing that lots of people are using your poor-man's-sed, and even getting kudos from these people, does not mean that you've created something new and awesome. OK, devil's advocate over. I don't really believe all of that, although there is _some_ truth in it. We should try to stand on the shoulders of giants, and creating a monolithic application which replicates the behaviour of sed, grep and find but in a more tightly-coupled and less reusable package is still behaviour worthy of (mild) criticism in a programmer. If we don't make these criticisms, then in 10 years we'll still be awash with half-assed versions of Smalltalk, or package managers that are no advance on apt or yum, or what-have-you. As a community this is a huge challenge for us. So much work done by programmers is pointless reinvention of work already done (and improved in countless iterations) by others, and we should lament the fact that reuse is so hard that just rewriting stuff in your favourite language is considered to be the best option. |