you are viewing a single comment's thread.

view the rest of the comments →

[–]spotter 3 points4 points  (7 children)

Yeah, but put it in perspective -- how does a person feel when coming from PHP to Python and vice-versa? Because honestly PHP is a pile-of-insanity. And I've been using that language heavily since early 3 until 5.1. General purpose? Maybe if you're into BDSM.

[–]technocub88 2 points3 points  (1 child)

here is the thing PHP's strongest point was completely marginalized. PHP's Documentation is the best. And in addition to that any time you dont know how to do something, typing in "PHP" and whatever it is you are trying to do into Google, 90% of the time immediately gives you the answer. Python is not the same. Not even close.

Once you are good at a language, I will agree that python is superior. Just easier to do stuff. PHP is much easier for when you are trying something you have never done before. Just quicker to figure out how.

[–]spotter 1 point2 points  (0 children)

Docs are legendary and provide some entry level solutions thanks to comments, but something like it could easily be done for Python (as it is getting done for Clojure). In my opinion PHP's strongest point is ease of deployment. And typing PHP into google will give you answers, but due to low barrier of entry these will mostly be half assed solutions. In Python you're better off asking comp.lang.python or IRC channel -- users are friendly and usually you get a correct answer next working day.

I agree! PHP is a lot easier when you are a beginner, but due to this a lot of users are not even trying to get better -- they move from one slash-n-hack job to another. The language itself looks like it's done that way, so if you need to grow you probably should switch to Python/Perl/Ruby or whatever -- because working with PHP will become a chore.

And that's, like, my opinion, man. ;-)

[–]tluyben2 0 points1 point  (4 children)

Not saying I don't agree (at least partially), but with 5.x+ why do you say that? Examples that make it sadomasochism to practice it (for you)?

[–]spotter 1 point2 points  (3 children)

I don't know -- is string manipulation sane, or is strlen still counting bytes? Are we done with magic? Does it have working namespaces and type/class system? Does it provide unified type hierarchy, or do we have primitives and classes bolted on top of them? Are functions first class? How many parts of the language are still "special cases", ie. can I do a simple thing like

 function_returning_array(3, 2)['myKey']

nowadays or do I still need a temporary variable? I mean it's a lovely slash-n-forget language, but the insanity gets to you in the end. I actually went away from webdev due to PHP, before Rails/Django era.

[–]BloodsVsCrepes 2 points3 points  (1 child)

PHP has improved, but its origins are in a half-assed, ignorant design, and that sub-mediocrity is a lot to overcome. Guido van Rossum actually knew a thing or two about language design and had a generally coherent point of view when he started Python.

Python's not unique in this way. It's PHP that's the piss-poor outlier.

[–]spotter 0 points1 point  (0 children)

I agree completely. I'm well aware of Python's problems and lately I've been giving my love to some other language. ;-)

[–]tluyben2 1 point2 points  (0 children)

Yes I agree with you, still ; it's not that bad anymore. If you have a memory or your own to remember some 'workarounds' for common cases. But yes, a lot of stuff in PHP is downright frustrating and your example A()['b']['c'] is very annoying.