this post was submitted on 14 Jul 2023
363 points (90.4% liked)

Programmer Humor

31468 readers
965 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 58 points 1 year ago (2 children)

I get hating on PHP is a meme, and the language certainly has faults, but I feel like it’s no more arbitrary than how JavaScript behaves. And just like JavaScript, if you follow modern standards and use a modern version, it’s a much better experience. The language is only as good as the programmer.

[–] [email protected] 49 points 1 year ago (1 children)

but I feel like it’s no more arbitrary than how JavaScript behave

This is not the flex you think it is.

[–] [email protected] 22 points 1 year ago (2 children)

I didn’t mean it as a flex. It was a commentary on how the most commonly used programming language in current days is just as flawed as the most commonly used programming language in the past (in web development). Bad programmers are going to write bad code, regardless of the language.

[–] Funwayguy 3 points 1 year ago (1 children)

I'd like to think Typescript does a lot of heavy lifting where JS fails when it comes to web development. On the otherhand there is no fixing fundamental flaws in PHP.

Sure bad programmers write bad code, but if a language tolerates something so obviously janky via implicit unseen magic, it's just encouraging bad practices. PHP makes this worse by tweaking core behaviours in weird and wacky ways that can easily lead to security vulnerabilities.

[–] [email protected] 2 points 1 year ago

A high level language should make coding easier. If it doesn't why not just code in assembly, or even build an ASIC? And no, allowing you to fuck yourself by accident isn't making your life easier even if it seems simpler at the time you write the code.

[–] [email protected] 1 points 1 year ago* (last edited 1 year ago) (1 children)

Why not just use a good language though? Most of them are decent. It sounds like typescript is getting used a lot, at least - although it then gets turned into JavaScript for the browser.

[–] [email protected] 3 points 1 year ago (1 children)

Why not just use a good language though?

You don't really have a choice when it comes to front end web dev, JS is almost the only option for programming languages that run in the browser.

[–] [email protected] 1 points 1 year ago

Yes, there's a lot of lock-in with JavaScript. The first step would be designing a Python-based browser or whatever and getting people to use it. I know less about PHP.

That was more of a "why if you had the option". I've use JavaScript too for exactly this reason.

[–] [email protected] 16 points 1 year ago (1 children)

That's why JS gets hates on just as much as PHP, if not more so these days as JS is fuckin everywhere!

[–] [email protected] 1 points 1 year ago

JS is just popular because Google invests so much money into it to use it to make the web worse off.