Earlier quoted context omitted.
Kotlin is for Android apps. Scala is a Java replacement. Those frameworks are unrelated. Are you talking about building an Android app? I've built app in different Javascript frameworks. Angular, Vue, React. If I was building a website I would use PHP over Python, Golang or Javascript frameworks because what you get out of the box doesn't compare. Each language does something well. If I was building AI python would b…
> Kotlin is for Android apps Welp, guess all my Spring Boot web apps in Kotlin have actually been Android apps in disguise all this time..
PHP 8.1.0
241–250 of 286 posts
Re: PHP 8.1.0
#242Earlier quoted context omitted.
Elegant is not the word I'd use to describe PHP. Solid, perhaps. Undoubtedly useful. But if there is elegant PHP, I haven't seen it.
Hello World in PHP is literally Hello World I know no other language that elegant.
Re: PHP 8.1.0
#243Earlier quoted context omitted.
True, but that’s self reinforcing. The more you use a hammer, the more confident you become in everything being nails.
And that’s when you become a master of your tools and can wield immense power with them! But in all seriousness, PHP is a good language, and coupled with a modern framework like Laravel, it’s great to use. I’ve used it since 2002, and have recently got back into it properly after a decade in architecture roles, and it feels very welcoming and love using it. And I _have_ tried the whole JavaScript thing, but simply fi…
That still doesn't change the fact that, when you master hammers, you still have no idea of how to correctly use a screw.
Every language comes with some blind spots. Learning different languages is often enlightening because it forces one to see the solution space with a different kind of glasses.
Re: PHP 8.1.0
#244Genuinely curious: who here thinks PHP is a good choice for a new project and also has experience with other languages such as Scala, Kotlin, Python, or JavaScript and their respective web frameworks?
Re: PHP 8.1.0
#245Earlier quoted context omitted.
Statistically PHP software has the most vulnerabilities. They are also quite different when compared to other languages. Language has many features which might be used unintentionally by programmer, leading for serious bugs. Not a good language to start with.
What features are used unintentionally leading to serious bugs?
Re: PHP 8.1.0
#246Earlier quoted context omitted.
>Here is the one features that is taken for granted in "modern stacks": >Edit file -> Alt+tab ctrl+R. Oops, Alt+tab fix -> Alt+tab ctrl+R. Yeah, this is pretty much what the Common Lisp and Smalltalk people have been doing since mid 1980s. Except that they're not limited to web applications. And also python people to some extent, with ipython. And Haskell people with ghci. The value of less friction cannot be oversta…
> Except that they're not limited to web applications With PHP, you're not limited to web apps as well. The same rapid-fire style development can be applied when building CLI applications.
Re: PHP 8.1.0
#247Earlier quoted context omitted.
Iterating on ideas is much quicker when the compiler tells you when you made a mistake or failed to change your code after changing your mind.
Honestly, I don't see much difference. You learn either way. People may have preferences, that's fine. A compiler isn't a magical tool that creates bug free code.
The difference in time it saves the dev can be anywhere from a few seconds to minutes per mistake.
Multiplied by hundreds of mistakes, it makes a huge difference. And that's not even getting into the advantages of better autocomplete for external libraries.
As someone who has written many thousands of lines of PHP, JS, TS, C#, Java, and Python, I now find it baffling that someone would start a project in 2021 without a great type system as a safety net.
Re: PHP 8.1.0
#248Earlier quoted context omitted.
> Javascript doesn't have the size of build-in library. Golang is compiled and limited, blank spaces/tabs will kill a Python program. Ruby /rails is slower. I have once heard an ancient prophecy (I think it's Greek) that says "Debating around PHP online summons the ghost of the dark behind your back" or something like that (I don't speak Greek, sorry). In the Client/Server world now days, the most of the time you onl…
> Server-side Rendering, which no other backend-only language could do Isn't it the definition of a "backend-only language" that it renders server-side?
Re: PHP 8.1.0
#249Earlier quoted context omitted.
Async/await isn’t something to hope for. It’s a terrible pattern languages should work hard to avoid.
Care to explain why?
"You’ve still got two colors. Async-await solves annoying rule #4: they make red functions not much worse to call than blue ones. But all of the other rules are still there: ..."
You can continue the story at:
https://journal.stuffwithstuff.com/2015/02/01/what-color-is-...
Re: PHP 8.1.0
#250Earlier quoted context omitted.
Elegant is not the word I'd use to describe PHP. Solid, perhaps. Undoubtedly useful. But if there is elegant PHP, I haven't seen it.
I see php sort of like a trusty hammer. It's a hammer. Doesn't have to be elegant. It's a hammer. The nails are http requests and PHP is a damn good hammer.