Another language carried by tooling is Go. The language itself doesn't even have sum types, lmao.
Go with PHP
511–520 of 532 posts
Re: Go with PHP
#512Earlier quoted context omitted.
# is a PHP comment syntax. #[foo] is as much of a comment as #foo is.
Not since PHP8 it's not [0], it's a real part of the language that you can read and view using reflection [0] https://www.php.net/manual/en/language.attributes.overview.p...
Unknown attributes are also ignored silently, which isn't really a good sign.
Re: Go with PHP
#513Earlier quoted context omitted.
Not since PHP8 it's not [0], it's a real part of the language that you can read and view using reflection [0] https://www.php.net/manual/en/language.attributes.overview.p...
It's still using a subset of the comment syntax, and will still be ignored as comments rather than hard-fail in earlier versions. Unknown attributes are also ignored silently, which isn't really a good sign.
Re: Go with PHP
#514Re: Go with PHP
#515Earlier quoted context omitted.
It's still using a subset of the comment syntax, and will still be ignored as comments rather than hard-fail in earlier versions. Unknown attributes are also ignored silently, which isn't really a good sign.
This is one of the reasons I like PHP, in newer PHP versions it is an attribute but in older versions it is just a comment. Clever and backwards compatible.
It may technically be forwards compatible syntactically (`#[foo]` will, as you say, just be ignored by PHP 7), but that's an anti-feature (assuming that the attribute isn't a no-op, it'll presumably break something else).
Re: Go with PHP
#516Earlier quoted context omitted.
This is one of the reasons I like PHP, in newer PHP versions it is an attribute but in older versions it is just a comment. Clever and backwards compatible.
It isn't backwards compatible (`#[foo` used to be legal PHP 7, but is illegal in PHP 8). It may technically be forwards compatible syntactically (`#[foo]` will, as you say, just be ignored by PHP 7), but that's an anti-feature (assuming that the attribute isn't a no-op, it'll presumably break something else).
> `#[foo` used to be legal PHP 7, but is illegal in PHP 8).
So it is not a comment in PHP8 then.
Re: Go with PHP
#517Re: Go with PHP
#518Earlier quoted context omitted.
Joking aside, as someone who runs their entire saas off a single bare metal server in Las Vegas, I have been toying with the idea of pushing some stuff to the edge. The reason being, sometimes those average load times are not giving you the real picture. If my average load time is 560ms per request because 90% of requests are 400ms and 10% are 2 full seconds, that might be a problem. Fixing those 10% requests and bri…
I like the idea of a "Progressively Enhanced Monolith". Start by building the core of the application in something like Laravel that can do anything and be developed quickly, then stick it behind a proxy/CDN like Cloudflare. Then if you find endpoints or pages that are accessed frequently and would be better as their own microservice then use a small serverless worker to either respond directly from the edge or forwa…