Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:63493 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 14567 invoked from network); 17 Oct 2012 10:51:26 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Oct 2012 10:51:26 -0000 Authentication-Results: pb1.pair.com header.from=nikita.ppv@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=nikita.ppv@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.42 as permitted sender) X-PHP-List-Original-Sender: nikita.ppv@gmail.com X-Host-Fingerprint: 209.85.215.42 mail-la0-f42.google.com Received: from [209.85.215.42] ([209.85.215.42:65521] helo=mail-la0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 78/F6-64689-CAD8E705 for ; Wed, 17 Oct 2012 06:51:25 -0400 Received: by mail-la0-f42.google.com with SMTP id e6so5036545lah.29 for ; Wed, 17 Oct 2012 03:51:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=ObQsjqSZmMIRSyad8as/jZmzC7U17DgiRl5SjAeq0Js=; b=phWfaALuKI6/Q0adEuO9s75zkmfFnqfSQyD8HN8FxQxOSr6ixmDdmiUKDluK8GCM+t m8mdu+LrsgMqwyaLuHLbbZ5NOqUS6SFIui/OVxnWGdrSGPbbnLNWTfHWdNI1LaBptG09 Ukakwsb90B4lSuQ8CeWj323JaTI6XblKh8j4/73X5KOuFgD8Rp7RW56z8oalGuZ/nB1R JBVcAQAxahOy+Hp7A+2Ey7zehZFljsGGHKRAX7JaEChT762gcaYcJBqtaJ7MuzqlYCSc SlD1aTjP+I+esYDJsbvFn1n3xKEJQ23f8clEM9K+nKT3Vprkzal4g3RVoGAkzhAT/68k vJQQ== MIME-Version: 1.0 Received: by 10.152.148.40 with SMTP id tp8mr15472829lab.30.1350471081631; Wed, 17 Oct 2012 03:51:21 -0700 (PDT) Received: by 10.112.83.100 with HTTP; Wed, 17 Oct 2012 03:51:21 -0700 (PDT) In-Reply-To: <507D2FB3.3030806@sugarcrm.com> References: <9570D903A3BECE4092E924C2985CE485612B6434@MBX202.domain.local> <507D133A.4040701@sugarcrm.com> <507D2FB3.3030806@sugarcrm.com> Date: Wed, 17 Oct 2012 12:51:21 +0200 Message-ID: To: Stas Malyshev Cc: Amaury Bouchard , Levi Morrison , Clint Priest , "internals@lists.php.net" Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2 : Typehints / Accessor Syntax From: nikita.ppv@gmail.com (Nikita Popov) On Tue, Oct 16, 2012 at 11:58 AM, Stas Malyshev 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.