On Tue, Oct 16, 2012 at 11:58 AM, Stas Malyshev <smalys...@sugarcrm.com> wrote:
>> Type hinting in parameters is a really good thing, and it doesn't
>> transformed PHP in a strongly typed language.
>
> It however gave a permission to people to try sneak in strong-typedness
> through various backdoors arguing exactly that: "but we have strong
> typing for parameters, why not for other things?"
This is a non-argument. You're always talking about people sneaking in
stricter typing and more typehints, but you're making it sound like
some fundamentally bad thing. I didn't actually see you argue, not
once, why stricter type checks are a bad thing. Clearly the community
has interest in this (both in property type hints and in scalar type
hints and ...), at least from where I'm standing. There certainly are
arguments for both sides, but I'd ask you to bring those forward if
you disagree, rather than making useless statements like these (and
the ones in your previous mail). Or if you feel like you already
explained it too often, give us some links. You know that the mailing
list is not really searchable.

> Also, the fact is that other dynamic languages do not
> have strong typing. It may be they just aren't smart enough to recognize
> everybody needs it - or there may be a reason why it doesn't happen.
I guess that you looked at Python and Ruby making those statements?
Well, those are just two languages, with a completely different object
model. PHP on the other hand has an object orientation system which is
much closer to Java and as such has different needs. Also, I should
point out that there *are* scripting languages that have optional
strict typing and recently there turn up more of those. One of the
newer languages is Dart and another that came very recently is
TypeScript. TypeScript is a JS superset (which compiles to JS), so
there you have a *very* dynamic language hands in hands with
(optional) strict typing. Actually JS is a good bit more dynamic than
PHP, for that matter. I hope you now see that this idea is not unique
to PHP and might not be as absurd as you are making it sound.

> Not really, since PHP is not a compiled language and as such does not
> have static type controls. Now not only every foo($bar) can blow up but
> also every $foo->bar = $baz. Not very useful.
The code would blow up anyways (hopefully). The difference is where it
blows up. At the root of the problem or somewhere deeply down the
line.

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to