Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:62170 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 97057 invoked from network); 15 Aug 2012 08:29:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Aug 2012 08:29:19 -0000 Authentication-Results: pb1.pair.com header.from=sv_forums@fmethod.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=sv_forums@fmethod.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain fmethod.com from 74.125.83.42 cause and error) X-PHP-List-Original-Sender: sv_forums@fmethod.com X-Host-Fingerprint: 74.125.83.42 mail-ee0-f42.google.com Received: from [74.125.83.42] ([74.125.83.42:46291] helo=mail-ee0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F0/10-30529-EDD5B205 for ; Wed, 15 Aug 2012 04:29:19 -0400 Received: by eekb15 with SMTP id b15so372711eek.29 for ; Wed, 15 Aug 2012 01:29:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:from:to:cc:references:subject:date:mime-version :content-type:content-transfer-encoding:x-priority:x-msmail-priority :x-mailer:x-mimeole:x-gm-message-state; bh=YXlvZM/EflbVdqX7qncRbMLfa+KUJyv8lZqmJEnUKq8=; b=VcvGm/yHCe149JgvrLzwQPHJ8Bxliz+4lt15PuVtCyoNMD5sXz/luRSTLRgR14+EDv 9UfniY5dl9uqVngdLOQruYTuSHiQnT3DkjjbzUxzPBKkwABg6dz87KTtGu7BTHb65+Ob b9WZUDzVjIUGqqpE4QSQf+7a9cVJhXDE03jjW0/85nZ8hvU4HQxqm3dS9MseaRgWXgHd vPCvBsvgCtbqrelPBE5VllnjPEvOuvYhVceQSZso/dA0DPj+5kuQHm43IcgcguCRxKop GZYDHHfrr1UEae4Lc+79/wwjDh41NIaE7BRl9g+Vl1ePn3uXhpb1YSFE/1dYyKOXhh2q MMqQ== Received: by 10.14.213.137 with SMTP id a9mr19109748eep.38.1345019356179; Wed, 15 Aug 2012 01:29:16 -0700 (PDT) Received: from pc (95-42-66-13.btc-net.bg. [95.42.66.13]) by mx.google.com with ESMTPS id d48sm2113620eeo.10.2012.08.15.01.29.14 (version=SSLv3 cipher=OTHER); Wed, 15 Aug 2012 01:29:15 -0700 (PDT) Message-ID: <6D84602D0F514FA3B82C11DBAF58AA53@pc> To: "Stas Malyshev" Cc: References: <502A86AA.2030203@sugarcrm.com> <502B57AE.4070801@sugarcrm.com> <502B5C7F.1070708@sugarcrm.com> Date: Wed, 15 Aug 2012 11:29:12 +0300 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="ISO-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Gm-Message-State: ALoCoQkInUKP3oWNopR2Yyg1RPlQwXozDXoWgjh3dxpk41kqMKljpsDI9IkfHellnn8SS3LBqek9 Subject: Re: [PHP-DEV] Inline typecasting / typehinting for classes and interfaces From: sv_forums@fmethod.com ("Stan Vass") >> And assignment is a kinda common operation. So I hope you can see what's >> wrong with it now. > > No I do not. Not every imaginable use case should have dedicated > language construct for it - sometimes it is OK to type 2 lines of code. > Sometimes even 3. This case is well served by existing language syntax, > which also allows much more flexibility and control over what happens if > the variable does not match. I see no reason to invent language > construct the only purpose of which is to save you typing one if clause. Let me ask you - do you think the existing PHP typehints are pointless too? Do you feel they don't give you enough flexibility? Do you feel they reinvented a language construct for the purpose of saving the typing of one if clause (per argument) (per method) (per class)? And why do you keep ignoring the fact that IDE's need additional clutches to understand the type of the variable? Stan