Earlier quoted context omitted.
You can be burned by every program language if you dont know the in and outs. It all boils down to, pick the right language for the job and more important, know the language you choose.
Saying that all programming languages are equally good is about as true as saying that all sorting algorithms are equally fast.
PHP in 2019
351–360 of 489 posts
Re: PHP in 2019
#352Earlier quoted context omitted.
This is my opinion. Some hints why I think PHP is not great: * property type declaration in doc-strings * bad documentation * verry verbose for a dynamic language * a lot of inconsistencies * automatically loading of classes is a hack (psr4) which doesn't support importing functions without specifying it in a global project file
As a note, typed properties are coming with 7.4.
Re: PHP in 2019
#353Earlier quoted context omitted.
I’d argue that the only “the” is one that’s distributed with it, which is PEAR. I’m not saying PEAR is used more or that it’s better, just that it’s the only one close to “default” with the language distributions.
I literally know no one who uses PEAR.
Re: PHP in 2019
#354Earlier quoted context omitted.
> You have some syntax to opt into a later release (e.g. doing ` imagine the exponential complexity as old behaviours need to be kept around for various levels of opting in.
The complexity still has to exist somewhere, right? By avoiding this, they're just keeping it in all the developers' heads, rather than a legacy mode in the compiler. I'm not sure that's the wrong decision, but it's not a great one, either. Too much complexity in the implementation can kill the project. Too much complexity in the language can kill a person's hope of learning it.
Re: PHP in 2019
#355Writing with PHP is better than ever... and getting better and better. And... you don't need too worry too much about the server, or the request lifecycle, or networking... you just write your app, in a language which is, in my opinion , going in the right direction with a stronger slant towards OOP and types. Of course it's still entirely possible to write garbage PHP code... but it's possible to write garbage in an…
My issue with modern PHP is that it's essentially becoming Java. And with the JVM and the Java ecosystem, what is the compelling reason to not just pick Java at this point? With Java you are basically writing exactly what you would be writing with PHP, except with more language features and the ability to opt into other languages on the JVM like Kotlin and Scala. The modern additions are fantastic for projects and te…
PHP is on this aspect still strong and you can still choose your weapon of choice to build whatever you want and not being hostage of a company.
The only missing part is a good private composer repository for companies who don't release source code.
Re: PHP in 2019
#356On one hand, I do see that HN (and probably Reddit) live in a bubble. Where most of the darling languages and tools have very low use in the real-world. And where most of the languages and tooling that actually run the real-world go un-discussed, or simply dismissed, because they're boring and don't appeal to students and entry-level devs working on side projects. I realize that the perspective most rookies get from…
Re: PHP in 2019
#357Earlier quoted context omitted.
I'm not really sure why this comment is getting downvoted, but literally every single thing in that post still holds true.
If you read the article, it's full of notes about "this was fixed in 5.4" or whatever. A decent chunk of the remainder has been fixed in the 7.x series, and some of the remainder is slated to be solved in the (as of yet, unreleased) 8.0 version. Just scrolling through at random: > A function’s return value can’t be hinted. But of course, this has been incorrect for years . The next was fixed in 5.3, the next two be f…
- A fair chunk of phpsadness is still unfixed - e.g. https://bugs.php.net/bug.php?id=49664 where recursing too much producing a segfault is Not A Bug.
- PHP's release machines were compromised. Let's not worry who downloaded it. http://news.php.net/php.internals/77695
- PHP 6. There's no hope of making PHP work in Unicode, ever. It's like Python 3, except half way through, they went 'let's not even bother'.
- The rebuttal elsewhere on this thread points to the very problem in the PHP community:
>> PHP’s one unique operator is @ (actually borrowed from DOS), which silences errors.
> Yup. I find it very useful on the unlink() function which will raise an error if the file you're trying to delete doesn't exist.
That just demonstrates that unlink is broken! PHP's error handling is some horrible collection of C, C++ and just spamming stderr.
Re: PHP in 2019
#358I'm working in a vanilla PHP codebase right now, and I see all sides - the fractal design fails and the surprising improvements to the language. I've just read up on the architecture of Laravel, and given the public opinion of it, must be a very nice framework. What strikes me most about PHP is the fundamental request/response execution model. Your execution context begins when a request is received and ends when we…
Re: PHP in 2019
#359On one hand, I do see that HN (and probably Reddit) live in a bubble. Where most of the darling languages and tools have very low use in the real-world. And where most of the languages and tooling that actually run the real-world go un-discussed, or simply dismissed, because they're boring and don't appeal to students and entry-level devs working on side projects. I realize that the perspective most rookies get from…
I think the bubble has to do with purists vs pragmatists. I once joined a Java team as a front-end dev (I'm full-stack). They would do the back-end. They had done everything by the book perfectly. Following all the best practices. But the back-end wasn't doing what it needed to do by a long shot. They were stuck. Meaning I couldn't make progress. So I cooked up a simple (temporary) PHP back-end so I could easily buil…
Re: PHP in 2019
#360I worked at a small PHP shop for about two years. There was a ton of legacy code that was utterly terrifying: a 13-deep nested `if` and the like, global variables, etc. I convinced my boss to let me start using Laravel. It made development worlds more sane. It made development orders of magnitude easier. Laravel does a lot for you, and they’ve thought about how to solve some tricky problems in clever ways. That being…