Comment on Nextcloud (PHP) vs OpenCloud (Rust)
possiblylinux127@lemmy.zip 6 days ago
I’m not the biggest fan of Nextcloud but there currently isn’t a lot of good alternatives that have the same features and polish.
The issue with Nextcloud is the PHP junk it comes with. Writing something in Go is much better and it is silly to me that Nextcloud puts code in docker volumes. If they could separate out the code and data they would be in a much better position.
phoenixz@lemmy.ca 6 days ago
So serious question: what,.in your mind, is junk about PHP?
possiblylinux127@lemmy.zip 6 days ago
It is not really a proper language. It is designed to run to generate HTML dynamically but uses outside of that are pushing it. It is also problematic that Nextcloud mixes code and data. It is also slower than compiled languages like C, Go or Rust.
I think Go is really good for web applications with lots of server back end code since it is fast and static while being memory safe and easy to read. The Go syntax is cleaner than PHP and less hard to maintain.
phoenixz@lemmy.ca 5 hours ago
Why, oh true Scotsman?
Probably, but it requires a whole lot less work to get something done. One developer pays for 20 big ass servers, so if I have to spin up one or two extra servers over requiring way less developers, that is a no-brainer
Go kinda looks/feels like JavaScript to me whereas PHP feels more like C. I find modern PHP syntax to be cleaner than go, but that is a personal opinion. Either way, maintainability has more to do with your developers and coding guidelines than with the language itself.
sugar_in_your_tea@sh.itjust.works 5 days ago
I have a bunch of other reasons elsewhere in this thread, but I just wanted to back you up here. Go is a lot easier to deal with than PHP in many ways, and it has a lot of tools to track down issues, while also have a lot better performance. And I don’t even like Go that much (used it for the better part of a decade, pretty much since 1.0), and I much prefer Rust. But Go is 100% a good option for this use-case, since it’s mostly short-lived requests with relatively simple logic, so the various footguns I dislike about Go aren’t particularly relevant (and are way nicer than the footguns in PHP).
PHP feels like it “evolved” with hacks on top of hacks, and it’s sort of being cleaned up now. Go feels like it was “designed,” with conscious choices being made from the outset, so everything feels a lot more consistent. That makes it easier to spot bogs, performance issues, etc. Go is just the better option here, and it’s not close.