The team that makes PHP makes quality a higher priority than just about any other language; if something is built into PHP, it's pretty likely to work correctly. (For example, PHP and Python have the exact same problems with threads, and the PHP team says "don't use PHP in a threaded environment" and the the Python people say "come jump in the water is fine") It's true that everything gets shoveled into one big names…
Seriously? Don't get me wrong, I could imagine valid reasons to use PHP. But the quality of the language itself is at the very bottom of that list. I don't usually hear PHP advocates making that case. Usually it's a combination of "the language isn't that bad" and "there are a lot of libraries for PHP".
Ask HN: PHP for Python programmers
21–30 of 77 posts
Re: Ask HN: PHP for Python programmers
#22Don't worry about it. I was in a similar position a few months ago when I, a python programmer, was offered a perl position. Eventually you just get used to it, and you might even find things you like. I've stopped being as much of a language snob. Some features and most syntax are just decorative, and you'll adjust. The whole giant namespace thing would bother me a lot, but hey its worked for other people before.
Language snobs, as a rule, are people that have not programmed in more than one language, or that somehow think that their chosen superior tool makes them superior as well. Nice to see that learning a 'crappy' language like PHP got you on to a more even keel in that respect.
Re: Ask HN: PHP for Python programmers
#23Don't worry about it. I was in a similar position a few months ago when I, a python programmer, was offered a perl position. Eventually you just get used to it, and you might even find things you like. I've stopped being as much of a language snob. Some features and most syntax are just decorative, and you'll adjust. The whole giant namespace thing would bother me a lot, but hey its worked for other people before.
That said, there's nothing wrong with programmers being picky about languages. Not only are languages what we're forced to think in day in and day out, but they affect what tools we can use, how we structure our code, and (like it or not) what jobs we can easily get.
Re: Ask HN: PHP for Python programmers
#24Earlier quoted context omitted.
If you define quality as 'orthogonal naming of functions' and 'elegant constructs' then yes, PHP has its flaws. But it's been absolutely bullet proof in production for me and when I did find a bug I've had a patch within 24 hours straight from the core devs. They do take quality serious there, they just don't define it as language elegance.
I'm not sure I understand what your argument is. That there aren't major showstopper bugs that make PHP unusable due to various segfaults? Sure, that's true. But do you mean to suggest that such things exist in greater quantity in other such languages? You say the PHP devs have a sharper focus on quality than other languages; can you provide and kind of evidence for those claims? Not just good response time by the PH…
> PHP tends to be at the bottom of the "language quality totem pole" because as a language it's pretty low quality. The PHP interpreter may be fine as a piece of software, but that's a completely separate matter from being a quality language.
It is specifically for that reason that I broke it down in to two parts, and apparently we agree on the language quality from a design point of view, but from a 'have to use this in production' point of view we do not.
> You say the PHP devs have a sharper focus on quality than other languages;
That's a straw-man, I said no such thing, but it does happen to be my experience that the PHP devs respond very quickly compared to other platforms / languages.
> Can you provide and kind of evidence for those claims?
And no, I'm not going to provide you with any 'evidence' for my claims, you can take my word for it. This is not a court of law, and besides that I never made any claims about other languages before this comment and I don't feel like putting other languages and/or their developers down.
I know PHP as a language has its flaws and that there are some unfortunate choices made in the past that are very hard to undo but that's no reason for losing all objectivity.
Re: Ask HN: PHP for Python programmers
#25Earlier quoted context omitted.
Language snobs, as a rule, are people that have not programmed in more than one language, or that somehow think that their chosen superior tool makes them superior as well. Nice to see that learning a 'crappy' language like PHP got you on to a more even keel in that respect.
Technically perl, not PHP, but now all I see is arbitary syntax. It's nice.
Re: Ask HN: PHP for Python programmers
#26The team that makes PHP makes quality a higher priority than just about any other language; if something is built into PHP, it's pretty likely to work correctly. (For example, PHP and Python have the exact same problems with threads, and the PHP team says "don't use PHP in a threaded environment" and the the Python people say "come jump in the water is fine") It's true that everything gets shoveled into one big names…
Doesn't this come simply from other execution environment? PHP is used for websites and you're very unlikely to need/want threading there. I've never heard django/rails/whatever people complaining about threading (apart from the actual HTTP server people).
On the other hand, Python got popular in research / number crunching (numpy, scipy, etc.) / networking (twisted, tornado, diesel, etc.) -- and the multithreading requests seem to come mostly from that camp.
Re: Ask HN: PHP for Python programmers
#27If `BigNameCorp` writes a lot of PHP seriously, you won't notice that many problems. It's not going to be PHP anymore. It's going to be Symfony, Zend, Cake, or something else (maybe even some proprietary, internally used framework). It isn't that easy to find pure-PHP code these days - it just takes too much time to write. If you do however see an old-style "let's just include everything", "global variables are cool"…
It also depends on how long BigNameCorp has been around. They might take coding seriously now, but legacy code in general is a pain to deal with. Much less legacy code that's been written in a language like PHP.
Re: Ask HN: PHP for Python programmers
#28That about says it all.
Re: Ask HN: PHP for Python programmers
#29You'll be be fine. I've found it very easy to switch from/between C/C++/PHP/Python. Perl on the other hand...
Python/Perl/Ruby/PHP fill such a similar niche that I try not to go between them, because it would be boring.
My personal plan is to next go Erlang, Perl 6 or some Lisp variant.
Edit: Job offers for 2011 or so would be appreciated. :-)