3 ms·
Using interfaces/traits/protocols don't preclude strong typing. If you write code for a type that "has" stringiness, as expressed by a trait, then anyone can b
by rswail 6y ago
Using interfaces/traits/protocols don't preclude strong typing.
If you write code for a type that "has" stringiness, as expressed by a trait, then anyone can build a variant of their types that expresses that trait.
- withinboredom 6y agoYeah, for sure. That's certainly possible, but I rarely see people build for it, at least when it comes to value types like strings, ints, etc. One other thing that I DO like about type-less, is the ability to introspect, for example, in PHP: ``` foreach ((array) $my_class as $property => $value): ``` vs. a bunch of boilerplate and making sure types match up in most strongly-typed languages.