Live data from Hacker News

Go with PHP

gowithphp.com

521–530 of 532 posts

Re: Go with PHP

#521
post #141
post #24

I'm in the group described halfway down: was on the Internet during PHP 5, lost interest in it, and moved on [to Go]. I haven't written anything in PHP newer than version 5. Even transitioning from 4 to 5 was quite a big deal, I definitely noticed improvements. But it wasn't enough. I couldn't fit the data set in memory with PHP. But I could do it with Go. I couldn't do parallel computations in PHP in order to respon…

[flagged]

Yikes, you can't attack others like this on HN. We ban accounts that do that, regardless of how wrong someone else is or you feel they are.

If you'd please review https://news.ycombinator.com/newsguidelines.html and stick to the rules when posting here, we'd appreciate it.

Re: Go with PHP

#522
post #202

Earlier quoted context omitted.

I guess it depends on how it's communicated. If someone tells me he doesn't like PHP because of this and that reason, that's fine. Getting wound up about some specific programming language (feature) or any tech still raises a red flag for me. But then I might be terrible as well :)

Whatever happened to passionate programmers?

I am totally passionate about removing complexity from apps and stacks.

Re: Go with PHP

#523
post #417

Earlier quoted context omitted.

Sounds like a scripted and slower (not trying to diminish) version of Go.

But when he wants to add a feature he doesn't have to create a new microservice and a systemd file and a watchdog and setup the reverse proxy, all things needed for a go endpoint. He just drops a PHP file in a folder and be done with it, it just works.

You don't have to create a new (micro-)service, you can just add new functions to an existing one.

> it just works.

Are you trying to tell me that modern PHP is so cool it does not require LAMP or whatever? I highly doubt it.

You still need and use all the same stack, except you don't have to install thigs separately I guess.

Re: Go with PHP

#524
post #484
post #283

I've been using PHP for about 19 years and what I can tell is that both the language and its community have evolved the right way. Writing modern PHP is a joy, IDE support is great and we have tools for everything. Modern PHP is about community standards, not about any particular framework and exposing Laravel as the best way to get started with PHP is questionable. I wouldn't recommend it to anyone wanting to learn…

So Laravel is not robust? Honestly asking. Haven't written PHP in over 20 years.

Laravel only seems to be for small stuff like - the backends of Apples Webapps - spiegel.de, the biggest German news site - the New York Times website - backend services at Disney - About You (large online retailer)

Seriously, though, I myself work for an enterprise that runs big parts of the European energy grid and we use Laravel for all sorts of stuff. At a previous job Laravel powered a whole ISP.

Notice when people say Laravel is good for small stuff and early prototypes, they never explain why.

Re: Go with PHP

#525
post #283

I've been using PHP for about 19 years and what I can tell is that both the language and its community have evolved the right way. Writing modern PHP is a joy, IDE support is great and we have tools for everything. Modern PHP is about community standards, not about any particular framework and exposing Laravel as the best way to get started with PHP is questionable. I wouldn't recommend it to anyone wanting to learn…

The only bad part of the PHP community is the people that have never done anything else other than WordPress. The shittiest more careless horrible and bad practices riddled codebases I’ve seen in my life come from WordPress developers. It has nothing to do with the language though, it’s just that part of the ecosystem which I think is what drives all the negativity and looking down towards PHP.

Re: Go with PHP

#526

Earlier quoted context omitted.

I don't think the request object can be modified by the end user or that it is modified by the server at that point. If my belief is correct, does this code still contain TOCTOU bugs?

It's the underlying state of the database that will change between these different checks. Not the end-user modifying the request object, which is in PHP memory

Thanks for explaining it.

Re: Go with PHP

#527

Earlier quoted context omitted.

What "computer science terms" did you encounter, that you did not understand? I also do not have a CS degree, but every term that I've encountered in the Laravel docs I found easy to search for. Just don't rely on Wikipedia for explanations, for CS (and mathematics) subjects Wikipedia seems to be useful only to those already versed in the field.

I struggled with sorting out Contracts vs Facades vs Traits. I graduated from university 20 years ago with a software engineering degree, where it was drummed into me that simpler often is better, and much more robust. Reading the Laravel docs however, leaves more questions than I started off with. eg. https://laravel.com/docs/5.8/contracts – talks a lot about how Contracts are powerful additions (like all the other…

A facade cuts out the boilerplate to achieve the same ends as a contract, which is to provide a dependency of some kind.

I agree with the documentation sentiment. The documentation is enough to get one started, but not nearly enough to get the job done well. The community is overran with beginners, and you are left to your own devices once you really want to get your hands dirty.

Re: Go with PHP

#528

Earlier quoted context omitted.

This comes across exactly what the previous poster was saying as someone who turns their nose up to PHP. Especially the "you have to" gibe. > But there are many who have so many battle scars and war stories with the language and its ecosystem that they decided it's just not worth the pain anymore. I could say the same thing about javascript from the early days, through Jquery, and beyond. Should I turn my nose up to…

> I could say the same thing about javascript from the early days, through Jquery, and beyond. Should I turn my nose up to modern javascript because of the past 2+ decades I've been working with it? Yes. And I say that as someone who has been developing "modern" Typescript web apps full-stack for the last few years. My issue with JavaScript are fundamental to language design decisions that can't be removed due to maj…

Same experience. JS is shitshow and dumpster fire. I’m picking up Vue 3 and every time I have a new question I need to ignore Vue 2 documentation written 1-2 years ago because the paradigm has shifted away from the “option” API to “composition”. The same jarring change experienced in the React community when it shifted to hooks. It is no wonder I can find a cascade of defects in just about every modern website made written within the last 3 years.

It is not only bad for the developer, but for the users, too. The overall confusion and frustrations are abundant.

Re: Go with PHP

#529
post #17

As a fullstack developer who has worked many, many years in the javascript hellhole, I mean ecosystem, as well as the python ecosystem and .NET; coming back to PHP the last 2 years, working essentially in Laravel and the like - I couldn't approve more of this message. Seriously, PHP is the grand father that will drive you to class and you'll never be late, the car will never smell and everything will always just be f…

> it's typed (now) To note, you'll need strict mode for type hints to be useful. https://www.php.net/manual/en/language.types.declarations.ph... The fun part is, instead of going for a generic strict mode system we would have expected, PHP went pragmatic: as most application won't be 100% strict typed, you need to declare it file by file, the icing on the cake being that the restriction applies on the caller of the f…

> you'll need strict mode for type hints to be useful.

false.

Utterly false, I don't know where you came up with all of that nonsense. All type hints work as expected, just you can't typehint variables. Only parameters/class properties/return types.

And the `strict mode` is a failed experiment no longer recommended in new code (no side effects but no benefits either).

Re: Go with PHP

#530
post #478

Earlier quoted context omitted.

They are not. Attributes are metadata that can reflected/accessed at runtime: https://php.watch/versions/8.0/attributes

Comments can also be accessed at runtime :)

And a program can generally read its source code and make fancy adhoc interpretation, sure. That’s nowhere close to specified facilities that you are guarantied to be able to use with a fair amount of trust in the resulting outcome with the regular toolbox.
Post reply on HN