On 4/19/16 1:43 PM, Stanislav Malyshev wrote:
Hi!
Creating a generic feature that makes sense in a handful of
situations, while at the same time being one that's
waiting-to-be-abused in the vast majority of the rest (or as Tom put
it, a 'footgun') is a pretty poor bargain IMHO.
Completely agree with Zeev here.
It also seems to me that some measure of support for these features
comes from the "coolness factor" - look, ma, we have complex types, just
like those cool academic languages everybody is excited about! And I
don't deny the importance of language having some coolness factor and
getting people excited, but in this case I think it's a bit misplaced -
in *PHP*, I believe, most of the use for this feature would be to hide
lazy design and take shortcuts that should not be taken, instead of
developing robust and powerful type system.
Now, PHP's origins are not exactly in "powerful type system" world, so
it's fine if some people feel not comfortable with this rigidity and
having to declare tons of interfaces, and so on. This is fine. But
inserting shortcuts in the system to make it "strict, but not strict"
seems wrong to me.
Can we please, please drop the "you only want it because it's cool"
strawman? A number of people are using it, and it's a flippant and
insulting ad hominem attack; from everyone using it. It's the same
thing as "PHP is not $other_language, therefore nothing from that
language is useful for PHP." Which is an utterly wrong and useless
argument to make. PHP's history has very clearly been one of borrowing
and stealing ideas from every language we can find if they fit and make
sense in PHP (and not if they don't).
Referencing other languages to support the inclusion of a feature is not
a coolness argument. It's a "solved problem, prior art exists"
argument. If a need is identified within PHP for a given feature, it is
both logical and expected to look for prior solutions to the same or
similar problems. That's the whole point of OSS. That doesn't make the
solution used by another language necessarily the right one, but it
should be considered a viable candidate.
Similarly, actual computer science (as opposed to the software
engineering most of us do) is developing real and meaningful new
solutions to problem spaces, which take years, often decades, to
percolate down into production languages. That doesn't mean proposing a
language feature informed by academia is just being hipster or elitist,
it means learning from and benefiting from the work of others. That's
the whole point of OSS.
True, the onus is on the proposer of any new language feature to justify
its inclusion. I completely agree with that. But rejecting a feature
suggestion with "you're just trying to look cool" is unhelpful,
unconstructive, and frankly harmful to the community and the language.
Remember:
'Programming languages teach you not to want what they don't provide.'
--https://twitter.com/compscifact/status/375283793923670016
That means PHP-centric developers are inherently inclined to not think a
a feature PHP has right now is useful. It's an entirely natural and
normal response to have. That doesn't make it right, or helpful.
--
--Larry Garfield
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php