4 ms·
> your favorite language prevents you to copy paste code, have variables shorter then 4 letters "here's one place that PHP doesn't prevent poor quality code th
by wlll 6y ago
> your favorite language prevents you to copy paste code, have variables shorter then 4 letters
"here's one place that PHP doesn't prevent poor quality code that is the same as other languages, and so all languages are the same"
No languages prevent these things (that I am aware of), but not all languages have the same number of edge cases that PHP has.
> and also fixes the bugs for you, let me know this cool language so I can try it.
I've written a lot of languages over the years, but right now I'm enjoying Go, which kinda does help prevent me from writing bugs with it's static typing, but also it's simplicity.
> I am also sure that in your first years of coding your code had no issues similar with the ones you described.
What's your point here? Noobs write bugs and bad code? Sure, we agree! But that doesn't mean that PHP is a good programming language.
- simion314 6y agoIf PHP is a bad language, your complaints are just just irrelevant, I could probably find some bad code base made in Go and prove that Go is bad. > but not all languages have the same number of edge cases that PHP has. I agree , some have more some have less The things is that from your comment it shows you have no idea what you are talking about, I suggest you let people with experience in PHP to explain hat are the issues and how to work around them. I have a few experience in PHP, experience with 5.4 and older PHP not the 1990 version. What I could complain about PHP are small things I do not feel that I need some feature from Java or C#, my time is spent reproducing bugs reported by our users, debugging and fixing them or spent on adding new features, creating solutions etc. I admit when I was younger I would complain about why do we have to use AS3, or PHP or X for this, there are better languages but this days I know that the language is a small part of the entire project, the hard part is creating solutions, a new dev will start by typing code and offering you a fast solution that someone else needs to fix it later, an experienced dev will think at 2,3 or more solutions, consider all the advantages and disadvantages, test then and finally start writing the code - so IMO the fact that soem language has a bit more sugar coding or and IDE starts 2 times as fast is irelevant, what is important is the person that generates the solutions and the person that when a bug is raised can dig deeper and find the cause and fix it.
- wlll 6y ago> If PHP is a bad language, your complaints are just just irrelevant I don't really understand what you mean here. > I could probably find some bad code base made in Go and prove that Go is bad. "It is possible to write bad programs in PHP and also in Go, and therefore the languages are the same" YOu can write bad code in all languages, but PHP makes it harder to write good code. > The things is that from your comment it shows you have no idea what you are talking about Yes, my 21+ years of experience writing code in over 10 different languages, including a decent amount of time writing PHP, pretty much means I don't know what I am talking about. > I suggest you let people with experience in PHP to explain hat are the issues and how to work around them. <raises hand> > What I could complain about PHP are small things I do not feel that I need some feature from Java or C# I am not talking about features. In fact, Go has a surprising lack of features, it's one of the things that makes it pleasant to write, and easy to write well.
- simion314 6y agoI mean your proof is I seen PHP code then conclusion is PHP is bad. You are trying to compare PHP with Go, probably Go is better then PHP, but if Go is better that does not mean PHP is bad, just that Go is better (probably not for all use cases). So you have experience with PHP, probably are you thinking at html code mixed with PHP code? yeah that thing is bad but only news use that for large projects. If you do not mean that then I am not sure what PHP issues prevent you to write good code.
- wlll 6y ago> I mean your proof is I seen PHP code then conclusion is PHP is bad. You're over simplifying my point to make yours. I have seen bad PHP code. I have seen bad Go code. I have seen bad code in many languages. The proportion of bad PHP code however, is higher in PHP, for the reasons I've stated around edge cases and the difficulty in reasoning. > You are trying to compare PHP with Go, probably Go is better then PHP, but if Go is better that does not mean PHP is bad, just that Go is better (probably not for all use cases). Go being good doesn't make PHP bad, and PHP being bad doesn't make Go good. I'm not saying one thing is true because the other thing. I'm saying that PHP is a bad language. > So you have experience with PHP, probably are you thinking at html code mixed with PHP code? yeah that thing is bad but only news use that for large projects. Nope, you're making untrue assumptions about my experience. The largest project I worked on was over 300,000 lines of PHP and used templating. It controlled everything from a companies finances, to printing plate layout, to believe it or not, sorting robots on a conveyer belt. > If you do not mean that then I am not sure what PHP issues prevent you to write good code. I've talked about this. Edge cases and the inability to reason about the code. In PHP there are a ton of weird little behaviours or edge cases that you just have to know about that could cause bugs. It's hard to know all of these, and even if you do the sheer number of intricacies of the language means that it would be easy to miss some. PHP isn't alone in this. Go has little gotchas, Ruby has a fair few, Javascript has plenty, but PHP has loads.