4 ms·
I must be very picky, because to this day I still don't like it at all. It sucks less than it used to maybe, but if I compare it to other languages, I still wou
by farresito 6y ago
I must be very picky, because to this day I still don't like it at all. It sucks less than it used to maybe, but if I compare it to other languages, I still would rather use anything else.
- tyingq 6y agoCurious if that's a general aversion to dynamic typing, or specifically PHP.
- arp242 6y agoThe problems with PHP aren't really with the concept of dynamic typing as such, but rather with the somewhat curious semantics and really awkward standard library. These are relics from the past that are, unfortunately, very hard to fix without a "Python 3000 moment", and all the problems that brings. Although PHP 8 does fix a bit of it (various comparisons and operators are a bit better now) there's still a lot of it remaining, especially in the standard library IMHO.
- tyingq 6y agoThat's what I was trying to make sure I understood. There are people that just don't like dynamically typed languages.
- arp242 6y agoPHP offers some type checking (and has for a long time, albeit very limited) which is getting expanded all the time, including in this release.
- ehnto 6y agoThey're a bit overblown now I feel, and I wouldn't throw out the language and ecosystem just because a comparator got fussy. You probably won't win any "Code is Art" contests, and if you want to do computer science work then why even waste the time hating PHP, it was never for that. PHP is a web application workhorse, and it's really exceedingly good at that task.
- arp242 6y agoIt's not just the comparison that's fussy; if that would be it then that would be fine. It's mostly the really messy, inconsistent, and difficult to use standard library that turns me off personally. And this isn't about inconsistent argument order or naming, I can deal with that as well, but stuff like not being able to create temporary files well, or not being able to check for specific errors in fopen(), and a long list of similar things. These are things that make writing simple, correct, and elegant programs very hard, or sometimes even impossible.
- arcturus17 6y agoNothing in their comment suggests anything about typing. They might love JavaScript or Python for all we know.
- baby 6y agoI think you have to do webdev to really enjoy it, I never write PHP unless it's something with laravel.
- theSIRius 6y agoAs usual, it really comes down to personal preference. In the past year, I have managed a few things in Wordpress, wrote my own PHP, Flask and node sites; and after all that I would 100 % choose Flask or node over PHP. Node has the advantage of same language back and front, "asynchronous" execution and having both dynamic typing and static typing with TypeScript. And huge ecosystem obviously helps as well. Python also has pretty sizeable community and Django is probably a huge reason why a lot of people choose python over anything else. And the syntax, at least to me, feels much less cumbersome than PHP. But I have not tried PHP 8 at all.
- baby 6y agoI like flask and express, there are simpler than php franeworks like laravel so I can see why one would prefer using them, but django is weird and I could never get used to it. I always felt like there was too much magic.