I didn't want to kill it because then we would have to make fun of php, which would start a huge flamewar.
What? PHP is a *gasp* language?
I didn't know that!?! I must have missed the memo.
I have a love/hate relationship with PHP. It's free, it's easy, but good grief, structured programming went out the window aeons ago. OOP is where it's at!
BTW, look at PHP5, it's supposed to be fully OOP.
No. In fact, I'm hoping the Python folks decide to change their name to something that doesn't begin with a P that way I can just ignore any of the P___ languages.
Haters.... If you guys had skills then PHP wouldn't be a problem
OK - let us just take a quick glance at the string functions
in PHP, shall we?
OK, first off all. What am I dealing with here? Is this a class? A package? Is it literally a "refernce to string functions" (jk)? Or just an html page of functions that either manipulate or return a string? Well, here is the clairfication, "These functions all manipulate strings in various ways." Well, I guess we don't need to include or import anything. Onwards...
After clicking the link, the first thing that jumps out is the sheer number of functions. It is actually a bit overwhelming. A large library is good - saves plenty of time. Assuming that you navigate the library! They need to break things into smaller, less general, subdivisions. For example, the date, number and money formating functions should be seperated from things like strlen. Ditto for the md5 stuff. Why not have a md5 section? What does getting the md5 hash from a filename have to do with strings anyways? If they're going to lump 50+ functions together like this, they should seperate the commonly used string functions like strlen from things like similiar_text (an intersting n^3 recursive function, so now if I have some php source code, I know of at least one function that will at least bog and will likely crash the system
Why do so many of the example say that the output may look like
... this does not inspire confidence! And how come they don't have a strtoint or something similiar in there?
And then it dawns on us, the real reason that many of us don't like PHP is because in a world that long ago accepted OOP as a superior paradigm for creating and maintaining 95% of all applications, there are still those holdouts who love global variables, find mains the length of a football field appealing, who prefer using a variety of 'print' and 'scan' functions to using overloaded << and >> operators, and don't mind jumping between a dizzying array of scripting and markup languages - because they'll never reuse any of it anyways!
All kidding aside, after we start dissecting ACM and TC problem statements, I think a number of us would appreciate it if you were to provide php solutions. Hopefully, we can get Manta to provide the python equivalent and Colby or JoseTann to do Perl solutions as well.