[No PHPun Intended] A Brief History of Web Development
-
It should be rewritten in rust, any way.
::: spoiler Spoiler
/s
:::️ we need PHP interpreter written in Rust, noted
-
Ah yes, the language that picked strlen as the hash function for its hashtables.
Waaaaaaat
-
I personally feel that giving the growing user base things they want is probably the most prudent reason. Constantly refusing to provide simple constructs that are available everywhere else It's not a good look. In the open source world if you do that shit enough you end up getting forked.
The context and ease of switch in a functional programming layout is a rather clean implementation.
Otherwise you end up with the crap like they're pulling with flask were you just make an unnamed, unindexed number of functions. Can you sort and organize your functions and make everything clean? Sure you can. Does it happen by default? Almost never.
You can walk up to someone else's switch and see what the options are. The code flows through that simple construct and it's very easy to understand someone else's work.
I load up someone else's flask endpoint, It's just this multi-page stream of consciousness.
You don't need switch, But there's a reason why so damn many people ask for it. Before they agreed to include "match", They said just to use getattr and write your own switch.
I think I agree with you, and I also think you probably know better than me, but - Python couldn't become what Python became without doing this exact thing very deliberately, bordering on obnoxious at times. Fundamentals or "initial state" define the characteristic strengths and weaknesses for a language, but what to add and what not to, as well as "why" and "how", over time determine the true shape and user experience (lacking a better word there) of a language.
Despite its reputation, in my view Python has always been far more opinionated about how to do things than most give it credit for.
-
It's very rare that the backend language significantly affects performance. In 99% of apps you could have the most optimized backend written directly in machine language, and you'd just shave off milliseconds.
That's because in web development most of the latency comes from i/o (network requests, database access, file access), not from computation being slow.
wrote on last edited by [email protected]So why did Facebook build that whole system of converting C++ to PHP or whatever they did? Was it because they didn’t understand the savings? Or when you scale that high, the savings really are significant? Were there savings?
Edit to subtract: https://en.wikipedia.org/wiki/HHVM is what it eventually turned into, and apparently it showed significant improvements even above the previous system.
-
Waaaaaaat
I also like T_PAAMAYIM_NEKUDOTAYIM
-
I've toyed with WASM, creating a simple sudoku page, and it did take an empty page, added all the buttons, and then changed them upon user interaction.
I think, I also heard of the DOM modification limitations, but it's not a hard barrier afaik, there are just some cases where it can't
But still, doing something in (pure) WASM looks way harder than needed to me
Interesting
-
Most developers are also not going to create a "serious backend service". Most are making a random website, or chaining together a few "business logic" items. I think we're just talking about different levels of "serious backend service". Like, if you mean someone making a website for the biggest industrial machinery company in the fortune 500, but it's all B2B stuff and so it handles at most hundreds of QPS, then I think you'll find a lot of Java there. I just think that for the biggest B2C companies in the world that handle hundreds of thousands of QPS, it's not exclusively Java.
I'm not trying to say Java is bad or anything. It's just that it has a few quirks (like garbage collection) that start to matter when you're getting eye-watering levels of traffic. So, for the most serious of the "serious backend services" I think you see Java, but you also sometimes see C/C++ and Go.
What if those chains handle thousands of massages per second?
Serious backend is indeed a stretchy term. And I agree with that point b2b java is common. But our b2b backend handles multiple thousands of massages per second. I find the bottleneck to be MySQL and RabbitMQ.
I think it makes sense for a serious backend to have load balancing and nginx cache and horizontal scaling. I reckon QPS doesn't matter as much as you think it does.
I still don't think that java would be considered niche. I rather think that C or C++ would be considered niche. It takes longer to develop, and is not memory safe so I don't think that most backend systems should consider it.
-
Ah yes, the language that picked strlen as the hash function for its hashtables.
Javascript is living proof that your language doesn't need to be good to be used.
I tripped over this one in Delphi the other day.
function AnsiStartsText(const ASubText, AText: string): Boolean; function AnsiEndsText(const ASubText, AText: string): Boolean; function AnsiContainsText(const AText, ASubText: string): Boolean;
-
Just for the sake of being contrary, I know that there are still machines running on punch cards in some army-related places, where not changing anything is mandatory. I wouldn't be surprised if hot-wiring is also still there somewhere, it's just mostly running without changes.
The original Moog synthesizers used patch cords (in fact that's why a synthesizer instrument sound is still called a "patch") and I'm sure somebody somewhere is still fucking around with one of those.
-
Modern PHP is better because it's modern. Which early version of a programming language was good? I've used a lot of them, and by modern standards, I think dog shit is a somewhat appropriate description for most of them.
Early Kotlin and early Swift were good.
-
Yep, PHP is turning 30 this year! Wondering if "PHP is still relevant?" Ever since we have been hearing that PHP is dead. It was “dead” 10 years ago, 5 years ago, and “is dead” today. But somehow - it isn’t. Anyway... happy birthday!
wrote on last edited by [email protected]this is perl erasure
also php didn't cause the internet to suck; overreliance on javascript (and js based frameworks) did. there's a reason that modern internet is so slow and clunky and it's not php. at least php has the capabibility to improve over time not degrade.
-
In PHPs defense, it keeps evolving in positive, meaningful ways. If you are up to date with it, it’s quite sophisticated and enjoyable. Doubly so if you use a framework like Laravel.
PHP 8.4 is pretty good, TBH.
You absolutely CAN write great code with modern PHP.
...
Shame that most PHP I touch is legacy code that's at MOST PHP 7.4 - which is EOL since November '22 and has to be upgraded or replaced. -
Yep, PHP is turning 30 this year! Wondering if "PHP is still relevant?" Ever since we have been hearing that PHP is dead. It was “dead” 10 years ago, 5 years ago, and “is dead” today. But somehow - it isn’t. Anyway... happy birthday!
Array_filter and array_map having the arguments swapped pisses me of so much.!
-
Yep, PHP is turning 30 this year! Wondering if "PHP is still relevant?" Ever since we have been hearing that PHP is dead. It was “dead” 10 years ago, 5 years ago, and “is dead” today. But somehow - it isn’t. Anyway... happy birthday!
Js is dead use php!
-
Everyone in this thread: PHP sucks because it was bad when I last used it 20 years ago.
wrote on last edited by [email protected]Backend devs: JS sucks because I never learned it actually
-
I mean it does suck, but it sucks less than anything else we have.
wrote on last edited by [email protected]PHP is far from "least bad language". Nowadays it is an ok language, one of many. You can also write ok code in it. The main issue is that it's really easy to write horrible shit that just barely works and will break when you look at it wrong. In fact without a lot of knowledge and experience that is the code you will probably write.
There are much better languages for any webdev niche you can think of, and some that are just better for webdev overall (e.g. Elixir). The reason PHP is still relevant is mostly huge legacy codebases that require a lot of engineering power to maintain (because PHP is not a good language for maintenance).
The way I look at it is that PHP is the C++ of webdev (but slightly worse).
-
The only reason php is still alive is Facebook
WordPress?
-
So why did Facebook build that whole system of converting C++ to PHP or whatever they did? Was it because they didn’t understand the savings? Or when you scale that high, the savings really are significant? Were there savings?
Edit to subtract: https://en.wikipedia.org/wiki/HHVM is what it eventually turned into, and apparently it showed significant improvements even above the previous system.
Probably because someone said it was a good idea in a meeting.
-
Array_filter and array_map having the arguments swapped pisses me of so much.!
This person phps
-
Javascript is living proof that your language doesn't need to be good to be used.
I tripped over this one in Delphi the other day.
function AnsiStartsText(const ASubText, AText: string): Boolean; function AnsiEndsText(const ASubText, AText: string): Boolean; function AnsiContainsText(const AText, ASubText: string): Boolean;
Too late to change it now