Earlier quoted context omitted.
Quoted post unavailable.
Why do you presume this is "hearsay PHP hatred"? I (not parent) have PHP hatred. It is fuelled by decades of PHP development and -exposure. My hatred is based on failing projects, missed deadlines, burnouts, money stolen, severe downtime, and companies going bankrupt. PHP had a role (not the primary, mind you!) in all of them.
PHP – The Right Way
111–120 of 349 posts
Re: PHP – The Right Way
#112Earlier quoted context omitted.
Isn’t this same thing? Your dir in python structure is dictating the namespace isn’t it?
The dir structure is defined by me. Namespaces are defined by the 3rd party developer.
Re: PHP – The Right Way
#113I totally expected it to be a troll site. It's actually sensible advice. But, really, I suggest using other tools. We have nicer tools now.
I don't know that many nicer tools than Laravel, to be fair. Especially Laravel + Lighthouse, which is an extraordinarily neat GraphQL layer considering the huge deployability you get with PHP. PHP is progressing towards a nicer language in a way that JavaScript, IMO, is not. And taking tens of millions of programmers with it.
Re: PHP – The Right Way
#114Earlier quoted context omitted.
> I don't think there's a good reason to design a language specifically for web projects. If that's how PHP works these days (I haven't used PHP in a decade or so), I'd suggest that might be a bad thing. It's very rigid, and if the language gets anything wrong that compromises the design of every project that uses it. Languages should provide simple primitives that frameworks and libraries build on. That has always b…
> That has always been the goal of PHP, to be a web framework in itself This is untrue. PHP was a templating language and form-handler first and foremost[1]. It took a long time for it to move out of that (I'd argue up to 5.6) and become an actual programming language rather than a template language on steroids. Edit: we still have to move out of template mode in every file by adding a So, essentially, we now have we…
> PHP development began in 1994 when Rasmus Lerdorf wrote several Common Gateway Interface (CGI) programs in C,[16][17] which he used to maintain his personal homepage. He extended them to work with web forms and to communicate with databases, and called this implementation "Personal Home Page/Forms Interpreter" or PHP/FI.
He was working on his homepage (on the web) and wanted to make it easier to handle forms and communication with databases. That's basically everything the early web could do, and PHP aimed to make that easier.
Re: PHP – The Right Way
#115Earlier quoted context omitted.
> But, really, I suggest using other tools. We have nicer tools now. Debatable really. Within the web development space the options are rather limited in my opinion. Options: * Spring based apps - Downside JVM is a Resource hog * Python, Ruby, etc - The web frameworks are in my opinion not as full featured. Same with CMS systems. Also requires more resources. Also have limited OO features. * Go, Rust, etc - Really go…
We use Asp.NET and it is a giant surprise how good it is. We are unix ppl, Linux & MacOS so not a MS shop at all. We deploy to on-prem and AWS so no Azure.
Re: PHP – The Right Way
#116Re: PHP – The Right Way
#117A language that changes the semantics of functions between minor versions has no "right way". "count()"less examples of crap. I have currently two weeks of code migration behind me because code running correctly on 7.0 fails on 7.3 -- while I see the reason for change was necessary I also see the hopelessness of rebuilding a flawed house with a fundament build on a pile of manure. And the good news given to me by a c…
Yes you can build a great app in PHP. But so you can in Kotlin or Ruby or ...
Yes some have a career by starting with PHP. But that does not make it a good language for beginners. Same can be said (and to me is verrrry true) fro JavaScript.
Language design matters. It shapes how you think about code. Talk to people who've learned AND USED many languages including some esoteric ones like Haskell, a LISP or OCaml. Then see what they have to say PHP and JS for beginners.
Re: PHP – The Right Way
#118Earlier quoted context omitted.
Not only that, I can almost guarantee that computers were involved in all of those failing projects as well, yet are not receiving any blame for it. Neither does the chairs. Damn chairs always avoiding blame.
Come on, CPUs aren't bedroom project hacked to write a bit of HTML. The depth of knowledge required to make one chip dwarfs all of PHP powered websites.
Re: PHP – The Right Way
#119My problem with PHP is that it solves the issue of code reuse the wrong way round. In other languages, you can import code like this: import mail as mailer The external code ("mail") does not have to make assumptions how it will be called when it is used. In PHP, it is the other way round. Every piece of code needs to try avoiding namespace conflicts by prefixing the code with something like this: namespace Illuminat…
There is 'use as'. But it is infuriating having to namespace your code when a folder name/heirarchy could do.
Re: PHP – The Right Way
#120PHP is actually a really decent option these days. And several libraries and frameworks built around it are flourishing.
Yes.
> PHP is actually a really decent option these days.
I beg to differ. What comparative options do you have experience with to base your claim on?