4 ms·
I once starting building a PHP library that was pretty much identical to this, I was really excited by the prospect of being able to write beautiful, object ori
by MattBearman 13y ago
I once starting building a PHP library that was pretty much identical to this, I was really excited by the prospect of being able to write beautiful, object oriented, method chained code. Eventually I was overwhelmed by the sheer scope of what needed to be done and abandoned it. These days I work (almost) exclusively in Ruby, and life is good.
I'm not trying to dump on this project, quite the opposite, I hope they achieve what I was never able to. The point I'm trying to make is that I could only defend PHP for so long before I had to admit that it's a lost cause, and other languages are simply a better fit for web development.
Stuff like this should already be part of PHP, but it's not, and I'd bet good money that it never will be. But hey, we got namespaces and late static binding, things I've used maybe once each.
- niteshade 13y agoTotally agree with you, and just having done the String class, I am appalled at how many different kinds of return values you can get from methods. If that's not bad enough, then PHP will throw a curveball at you with its 'this method may return falsy values'. That's the kind of thinking I've avoided here, trying to explicitly return a boolean value, or results.
- MattBearman 13y agoIndeed, PHP desperately needs some standardisation. At least with your string class there'll be no more needle/haystack confusion :) If I find a bit of free time I'll see if I can contribute anything to this, as while I've all but abandoned PHP, I'd still like to help bring a library like this in to existence :)
- niteshade 13y agoYour help would be highly appreciated - there's loads to cover yet, and God knows what other horrors PHP has in store. As a sidenote, I read somewhere recently that there is some method to the needle/haystack madness. Basically, for strings, its needle/stack, and for arrays its stack/needle. Thought I'd share that.
- niteshade 13y agoAnd also, not to nitpick, but namespaces are (still?) basically a joke in PHP, and as for late static binding, well, same boat as you, my friend :)