Skill issue

7 points

I briefly touched PHP in undergrad and never worked with it again. Why do people hate it so much?

permalink
report
reply
6 points
*

It used to have some really strangely behaving functions and syntax. Stuff like inconsistency between throwing and returning error codes, weirdly named standard functions, adding strings with numbers, really really strange but very well known bugs you had to constantly work around and a lots of ambiguous syntax causing strange bugs rather than just crashing to help you out. It also had this horrible feature where if you write $$variable where the $variable contains a string, it’d access the contents of the variable with that string as name, which allows for huge security risks but also lots of “quirky” coding.

It was also one of the most supported languages for web back-ends, so lots of people had the displeasure of working with it.

But AFAIK the newer versions have made it somewhat of a normal language. r/lolphp used to document a lot of those oddities, so you could sort it by top all time if you want to see some weird shit.

permalink
report
parent
reply

But AFAIK the newer versions have made it somewhat of a normal language

Yup! The language maintainers have been slowly and surely standardizing the behavior you mentioned, first deprecating it, then issuing a runtime warning, and finally making those old behaviors throw exceptions in new versions. The latest set of warnings are new in 8.3 and will be fully corrected in 9.0.

permalink
report
parent
reply

Because they unironically think it stands for “PHP Hates Programmers”

permalink
report
parent
reply

Any tech that’s sufficiently popular and accessible is also lowering the bar for how good you have to be to use it. Very similar to React nowadays imo. It’s just a dead simple mental model, so it was everywhere.

Also, PHP has come a long way and is now cleaner and faster than it ever was. There’s a lot of weird bloat surrounding the standard library, but the basic syntax is surprisingly simple once you get your head around how arrays work.

permalink
report
parent
reply

When it comes to language debates, I would highly recommend Rich Hickey’s 2011 talk, “Simple Made Easy”. Most issues of “bad” languages and code readability come to issues of familiarity, not of complexity. Complexity exists in all languages, sometimes to different extents, but most language discussions don’t isolate complexity. They conflate the two issues.

That said, I’m down to duke it out over some PHP minutia lol

permalink
report
reply

come to issues of familiarity, not of complexity … They conflate the two issues

Okay, but have you seen Objective-C++?

You get two distinct syntaxes in one language that you can’t use interchangeably.

permalink
report
parent
reply

I can’t think of any two compiled languages where allowing them to link against each other in a shared codebase would not balloon their complexity. So fair. I hope no one’s trying to do that without first being fluent in the two languages.

permalink
report
parent
reply

Fair, but the problem is that Objective-C itself has the same problem because of the design decision to make it a superset of C

permalink
report
parent
reply
2 points
*

I found a YouTube link in your comment. Here are links to the same video on alternative frontends that protect your privacy:

permalink
report
parent
reply

Programming

!programming@lemmygrad.ml

Create post

Welcome to the Lemmygrad programming community! This is a space where programmers of all levels can discuss programming, ask for help with problems, and share their personal programming projects with others.


Rules

  1. Respect all users, regardless of their level of knowledge in programming. We’re here to learn and help each other improve.
  2. Keep posts relevant to programming and related topics.
  3. Respect people’s personal preferences. If you disagree with someone’s choice of programming language, method of formatting code, or anything else, don’t attack the poster. Genuine criticism is fine, but personal attacks are not.
  4. In order to promote breaks from typing, all code snippets must be photos of code written on paper.
    Just kidding :), please use proper markdown code blocks.

Community stats

  • 11

    Monthly active users

  • 30

    Posts

  • 97

    Comments