Hacker News new | ask | show | jobs
by Chris2048 1907 days ago
Then why not work with PHP?
1 comments

There’s nothing wrong with PHP. And Laravel is very popular for good reasons.

There are people out there writing Python just as bad as what you think of as bad PHP.

One dev I knew insisted everything must be a list comprehension — including all for loops in regular flow control. That was Not Good(tm).

———

Edit: please read the parent comments for context. GP said there’s no right or wrong and OP said then why not use PHP and I said it’s not wrong.

I generally agree philosophically but PHP has a couple of features which make problems more likely: the C style error handling increases the odds of problems being ignored (yes, Python can have except:pass but that’s more obvious & requires intent) and the mushy typing hits even experienced developers who didn’t think about whether they needed === instead of ==. The standard library’s inconsistent parameter ordering for related functions probably deserves a mention here, too.

I started using PHP around 1998 and quit cold-turkey about a decade later for Python after noticing across the board quality improvements on every project. PHP isn’t terrible but using it requires constant diligence and few teams had the extra time and skills to use it safely.

I think the tooling we have in the Python ecosystem far exceeds PHP and I agree (and mentioned below) about the inconsistencies.

Been a long time since our chats at DC Python. Hope you’ve been doing well, sir!

Heh, yes, it has been quite a while. Pandemic pre-K has been quite the adventure so DC Python seems like a fairly distant memory ;-)
> There are people out there writing Python just as bad as what you think of as bad PHP.

By that logic: there are people "out there" jamming pencils up their noses, therefore a shovel is just as good a writing implement as a pencil..

Sure. It’s up to the end user to use the tools in an appropriate way.

There are a ton of inconsistencies in the PHP standard library and I’m not defending that but that doesn’t make it “bad” as you insinuated.

Then lets look at those semantics: what is bad, and is anything ever bad? Because I think mostly all frameworks are pretty easy in the small, it's how they help/hinder with larger projects that demonstrates their worth.

On that basis, sure, it's up to the user to figure out what's appropriate; and a shovel is not an appropriate writing implement - you could say it's even a "bad" one.