←back to thread

133 points avan1 | 2 comments | | HN request time: 0.629s | source
Show context
hu3 ◴[] No.45077689[source]
> In short, the modern PHP ecosystem gives us the best of both worlds: the ability to build quickly and confidently in PHP, while still having powerful options (C, Rust, Go) for performance-critical parts. This hybrid approach lets us stay productive without sacrificing speed where it matters most.

I understand this for a large codebase where rewriting is not feasible.

But if that wasn't the case, a C# APIs achieves both speed of development and execution in my experience. You'll rarely need to reach for C++ or Rust.

PHP is great but the language still doesn't allow things like typed arrays. It will happily accept string in a array of dates, for example.

replies(5): >>45077729 #>>45077935 #>>45078609 #>>45079138 #>>45081157 #
1. honorary-hickup ◴[] No.45077729[source]
> It will happily accept string in a array of dates, for example

While completely true, you are using static analyzer anyway which won’t let you do this.

The generics support will likely come in the near future, there has been momentum in it again: https://thephp.foundation/blog/2025/08/05/compile-generics/

replies(1): >>45077802 #
2. s1mplicissimus ◴[] No.45077802[source]
I'm working in PHP for about 15 years by now, and for about 10 of them I was promised generics. In favor of your health, don't hold your breath.