Remix.run Logo
overfeed 2 days ago

> The reason Go does not have a grand framework is that the language has a severely underdeveloped type system

Counterpoint: PHP.

PHP 5.3 had an even less capable type system, but developed several usable frameworks.

evantbyrne 2 days ago | parent | next [-]

That's a complimentary point, not a counterpoint. I'm talking about Go's type system being restrictive. PHP and many other languages avoided that particular trap by allowing variables to be reassigned to any type. Java and many other languages went in a different direction and instead chose to build more complete type systems.

pkphilip 2 days ago | parent | prev | next [-]

PHP's type system is so "dynamic" that it is very easy to build frameworks for it.

For instance, PHP allows for even function calls like this:

$language = "German";

$functionName = $language."_send_email";

$functionName("Mike", "mike_1@gmail.", "Text ...");

This sort of flexibility has its own problems and it is only possible because of the very lax type system of PHP but it is also extremely powerful when it comes to developing reusable frameworks.

const_cast 2 days ago | parent | prev [-]

PHP has fully looped back around and have a more capable type system than Go or even JS or Python. It took a long time, but it got there and it did it pretty competently.

In the past it got away with it because of PHP magic. PHP let's you do pretty much whatever, at least in the past.