Re:Go with PHP
by xu_ituairo on Thursday May 11, 2023 @09:39AM
(#35901862)
Your response here feels unkind and combative
Re:Go with PHP
by crazygringo on Thursday May 11, 2023 @09:59AM
(#35902192)
If you had stuck to facts rather than being insulting and inflammatory, I don't think your comment would be downvoted.
You make some interesting counterpoints but people aren't going to see them because of the counterproductive language surrounding them.
You should take a look at the HN guidelines.
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.
> I couldn't fit the data set in memory with PHP. But I could do it with Go.
You can fit dataset in PHP and utilize all of the available memory. You can also use space-efficient Judy arrays for this purpose. You can control how much memory your script uses, all you need to do is know that there's a setting for it in for FPM context.
> I couldn't do parallel computations in PHP in order to respond to an HTTP request quickly enough. But I could do it with Go.
Of course you could, parallelization via pthreads was available since 2012 and before that you could offload parallel computation or fork and perform your own. Yes, it's not as efficient as Go's goroutines but there's a difference between "I couldn't" and "I didn't know how"
> I couldn't reliably and easily deploy to different systems with PHP. But I could do it with Go.
This is just a made up statement that makes no sense at all, what are different systems? Coffee machine and calculator? You can deploy to any OS with PHP. Since forever.
> Eventually, I couldn't write a web server with PHP. But I could do it with Go.
You could write a web server and web socket server with PHP since 1999. if you wanted to. But there's software like nginx which beats whatever you can come up with in go. You know, no need to write something that already exists.
> or even its security and consistency posture
There was never security problem with PHP, only with developers having no clue about HTTP or security in the first place. It's not like PHP had "php.core.security = false" setting. I'm honestly tired reading about this made up crap that has no backing whatsoever. Language is faulty enough and there's enough material to use to write about as criticism, but security is not and was not one of them.
> And I don't judge or look down on PHP programmers. I just don't think it was the right tool for my jobs
You write a bunch of lies and then you use another language as example of what worked for you, but that's not a criticism of the language or devs? You literally wrote you are writing web servers in go for your websites which are also doing some kind of smart parallel processing in order to respond fast to requests (cough, bullshit) and PHP wasn't there for you because of its faults - yet that's not a criticism. Every person that didn't have sufficient knowledge about operating systems, processes and computation writes this kind of inaccurate garbage you wrote and for some reason there's always audience that doesn't know about mentioned concepts equally and you tap yourselves on the back for going with <another tech>.
I'm user of Go and PHP, there's merit to both and I love both, I've been using PHP since 1998 and all of the comments you had about language not being able to do x or y is entirely inaccurate.