Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:82318 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 39894 invoked from network); 9 Feb 2015 20:42:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Feb 2015 20:42:25 -0000 Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.177 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.216.177 mail-qc0-f177.google.com Received: from [209.85.216.177] ([209.85.216.177:56490] helo=mail-qc0-f177.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B0/28-25034-0BB19D45 for ; Mon, 09 Feb 2015 15:42:24 -0500 Received: by mail-qc0-f177.google.com with SMTP id m20so10948448qcx.8 for ; Mon, 09 Feb 2015 12:42:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=s15htMm68sf7AUZoO7+0B/1GqbZdRWCAHHI+TXOEgVs=; b=fR6KtAXbQeRxlRtNKoYOQGVIcieCVrTD9jYPQAvJmFh+tXL8hQ90OddoLBYcsLymKf oZRIcgHvWQZty8sNPeIp7kAyDawa3uEySGybCf0IKU/cWhn7V0WFj3LzAnK01sYvHYgY FunU0irMl+jVHi9x3A4L+sPsHo5dA65P50T0cG/HVClIlffkYG1XjUIi92tlkoedr1T5 V9sgaEHTAvfE2X/6USGG2ILogmDT3qC3laxaWUZwgk4o+/F/ZHFEP2HcUZ5M0rcjSDcw p+c1E4/ZHDn4c0oh37HYHSQC55HwVZB6YZEvimC+lV8+FootPZ7n8tLX1kMImNRh5xKv cxoA== X-Received: by 10.224.38.70 with SMTP id a6mr16811733qae.15.1423514541155; Mon, 09 Feb 2015 12:42:21 -0800 (PST) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.229.28.72 with HTTP; Mon, 9 Feb 2015 12:41:40 -0800 (PST) In-Reply-To: <54D9100E.6070404@lsces.co.uk> References: <54D9100E.6070404@lsces.co.uk> Date: Tue, 10 Feb 2015 05:41:40 +0900 X-Google-Sender-Auth: vrp3g2_V3FNfd_pK6AUwAJ6lGuE Message-ID: To: Lester Caine Cc: PHP Internals Content-Type: multipart/alternative; boundary=001a11c2d2748eeac5050eadce0f Subject: Re: [PHP-DEV] Design by Contract and scalar types ... From: yohgaki@ohgaki.net (Yasuo Ohgaki) --001a11c2d2748eeac5050eadce0f Content-Type: text/plain; charset=UTF-8 Hi Lester, On Tue, Feb 10, 2015 at 4:52 AM, Lester Caine wrote: > Much has been made of adding a class string to handle all the extra > unicode processing, but I am now thinking that a properly exposed string > and integer class which has the ability to assign constraint checks does > make sense. Then use of an integer value on a 32bit platform can error > when the actual value is too big for the target use. THAT is what strict > type checking is about! > Scalar may have object capability. https://wiki.php.net/rfc/autoboxing IIRC, this wasn't popular, but people's mind may change as time goes by. It does not cover your requirement, but it may be extended the way it does. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --001a11c2d2748eeac5050eadce0f--