Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:44659 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 65188 invoked from network); 2 Jul 2009 14:54:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Jul 2009 14:54:39 -0000 Authentication-Results: pb1.pair.com smtp.mail=lewiswright@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=lewiswright@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.224 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: lewiswright@gmail.com X-Host-Fingerprint: 209.85.220.224 mail-fx0-f224.google.com Received: from [209.85.220.224] ([209.85.220.224:41139] helo=mail-fx0-f224.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2F/BA-16153-E2ACC4A4 for ; Thu, 02 Jul 2009 10:54:39 -0400 Received: by fxm24 with SMTP id 24so1717883fxm.23 for ; Thu, 02 Jul 2009 07:54:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=6KpYAmMIOkN8+ME3ESEbe3Qcq2i7oGnDRSWuJRnT5EU=; b=djCxDmv+DP/0d2Hi6/Im4RE/YNVrZol8BA+QlWxzR66m1jrMnG89uTXTGOR1mOSXn2 K3bEkNSrShwf1NAoM90UZPwAXVGQNJ6BX5jY7ZGA6Xv/04FsDPt9cqoFpQo1xjviyGC4 ppv7PMdwQQN1FrMc2Rvqme/Dt/SeBfIBAAYcc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=ZjDAp6ROHi7AJVaZMIotGUzevXUfckOVyJRhgUdn+tznR7MZHm0PA2VVO48PC2S2hd UhS1ueU9Qsuwp/nwYmRoeB2Df4BHYlvVB7JkATNyjLX3xR2AUPkhYc2roH7kz8vOrZMu R+v6nRHAThHjhJO1zhmdVQ6bcYZuieJx+5WYM= MIME-Version: 1.0 Received: by 10.103.223.1 with SMTP id a1mr66852mur.112.1246546476114; Thu, 02 Jul 2009 07:54:36 -0700 (PDT) In-Reply-To: References: <85073B28-671D-4A8F-B2D6-5704E3E180BB@ilia.ws> <004b01c9fb1f$d6a62360$83f26a20$@com> Date: Thu, 2 Jul 2009 15:54:36 +0100 Message-ID: To: Paul Biggar Cc: Jonathan Bond-Caron , Ilia Alshanetsky , PHP Internals , Derick Rethans , Stanislav Malyshev , Hannes Magnusson Content-Type: multipart/alternative; boundary=0016364175e7e7a2e1046dba37b9 Subject: Re: [PHP-DEV] Re: Flexible type hinting From: lewiswright@gmail.com (Lewis Wright) --0016364175e7e7a2e1046dba37b9 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 2009/7/2 Paul Biggar > On Thu, Jul 2, 2009 at 3:17 PM, Jonathan Bond-Caron > wrote: > > From userland, I'm a big fan of this proposal / agree to the principle > although I'm not convinced that > > > > function($quantity) > > function(int $quantity) > > function(+int $quantity) > > function(-int $quantity) > > > > looks appropriate... > > > > Userland Note: The "-int" semantics confuses me, I realize it would cast > null's etc... but is it really a requirement? Can it be dropped? > > Yes, it looks off, doesnt it. I quite like ~int, which you suggested > below, for the casting. It makes me think "this is kinda an int". > > > > function($quantity) > > function(int $quantity) paul's (S) casting > > function(int! $quantity) STRICT type --- seems appropriate for php, > follows CSS/web style '!important' > > Yes, I like that too. > But the exclamation mark has previous use in conditionals, so it may be confused with "anything but an int" Lewis. --0016364175e7e7a2e1046dba37b9--