5 ms·
And that's why people look down on it - it's the same as how movie reviewers don't like regular movies, or book reviewers only like complex barely-readable book
by ars 3y ago
And that's why people look down on it - it's the same as how movie reviewers don't like regular movies, or book reviewers only like complex barely-readable books.
The simple stuff is just too boring once you are an expert in the subject.
- ainiriand 3y agoSimilar to how Stephen King will never win the Literature Nobel but he is such an incredible writer.
- agumonkey 3y agoPersonally I never shat on php because of simplicity but because of lack of expressiveness, limited language constructs and bugs. Combined with the massive new crowd going into programming with it, it gave rise to immense walls of pain (I remember wordpress sociable code source 12 screens long loops visually..). Later they started to move away from all that with PSR, typed object layer and more es6/py3 set of features.
- Morelesshell 3y agoI shit on php because when you develop professionally with it, you want strong types so what happend was that people started to use comments to hint types. Those hinted types are than enforced through an IDE. Thats just horrendes langauges missuse / misdesign.
- zer00eyz 3y agoI write go so... types. Types are great and they have downsides. Perl, PHP, Python, Ruby, JS, Lua, lisp, objective c are proof that you dont NEED them to have working code.
- kaba0 3y agoGo’s types are like talking about how cool internal combustion engines are, and you bring up a crank.
- gregjor 3y agoMaybe upgrade to a recent version of PHP from the last five years. It has strong typing, not just hints in comments. If you like strong typing, great, but many popular languages have weak types and dynamic types by design. It’s not some horrendous oversight.
- Morelesshell 3y agointeresting that it finally landed. But just because PHP apparently added reasonable typing in >7.2 still makes it a ranchy languages for most of its lifetime. Anyway ranting about it doesn't imply that i hate it or that i haven't used it. Its one of my first languages, but from my personal view, php is a shitty language in comparision to most others
- gregjor 3y agoYou would have to compare PHP to the alternatives available at the time. Originally PHP replaced Perl and ASP, which have their own problems and no static types (back then). Ruby/Rails came out and got traction but was slow, buggy, and still no types. Python also slow, no types, and not great for web development. Then we got Javascript and Node, with even less sensible types (no integers!) so you have to use Typescript and lots of tooling to get what PHP offers. In enterprise environments Java and then C#/.Net dominated and did have strong typing, but that’s not the world of PHP. Comparing PHP from a decade or longer in the past to Go et al. hardly seems apples to apples. So if you want to dismiss PHP as “shitty” compared to “most others” define shitty and identify the others.
- Morelesshell 3y agoPHP without types / types in comments existed in parallel to spring boot for years. And im pretty sure that the history of PHP is still everywere inside PHP, like php function inconsistencies across the board. Or whats the current situation on unicode support? When i started with PHP4 and Lamp, what a great time. JavaEE was bloated, not a lot of good free webservers available, granted. But while PHP5 was great and had a loooong shelflife, JEE became much cooler and had fundamental critical things like CDI and really good CDI Frameworks. Eclipse Java IDE was always really good, something PHP hadn't had for ages. And if you look at the fundamental difference between lets say java and php: In Java you have specs and reference implementations (partially also thanks to oracle, you now have mulitply companies having their JVMs) which made the JVM very robust and fast. When Facebook did the hhvm/hack stuff, that was great and pushed enough nerves to rethink the performance of PHP but the performance gains were stupid crazy. Thats a very good indication when a language with so little money and support has such a huge performance gain after such a long time existing. The fact that Facebook than threw the PHP community under the bus with hhvm/hack didn't make it better.
- kyriakos 3y agothere are many loosely typed languages that are used professional (in addition to PHP). dynamic typing it has its pros and cons but that doesn't stop it from being used professionally.
- Morelesshell 3y agoMy point was that the professional side of PHP developers at that time, decided that they want to have a strong type system.
- zeitg3ist 3y agoI would argue it's not the same at all. If you're very much into art, you've probably seen the simple stuff already, and you would prefer to see something that surprises you or makes you think instead of the nth iteration of the same tropes. But PHP is a tool, and you want your tools to be boring and reliable. (Whether PHP fits the description is a different discussion.)
- ars 3y agoYou'd be surprised. A lot of programmers want complex tools because they are more interesting. They also tend to write unnecessarily complex code. For example instead of just doing something there are multiple levels of indirection and instead of simply operating on a variable they tend to setup overly complex types that get passed around. Obviously sometimes you need that, but I'm talking about adding this complexity when it's not necessary.
- zeitg3ist 3y agoOf course those people exist, and they also exist in PHP land because as soon as you start using its more advanced features it is as complex as the other mainstream languages. But I would guess that a majority of developers that are not CS researchers value simplicity over complexity, at least in theory. After all they’re just trying to get shit done.
- cies 3y ago> And that's why people look down on it Okay fair enough... > > I was never able to move from PHP to something else. But that's why people like PHP, they have little exposure to something else. People that have experience with langs like Rust, Java or C#, Kotlin, Haskell or Elm, OCaml of F#, they usually do not like PHP. Why would that be? People who only every have used PHP (and maybe some JS) they are usually the only ones raving about the language. If you have seen a lot of movies (critics usually have) you are better at judging the merits of movies. Same for languages.
- ars 3y agoI suspect it's actually you that doesn't have exposure to PHP. I have exposure to about half of those, and I like PHP. > are better at judging the merits of movies Their definition of "merit" is "surprises me and brings something new to the table", while a regular person wants "is entertaining". i.e. they are better at judging the merit of something not actually wanted.