Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:91735 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 16505 invoked from network); 17 Mar 2016 11:46:20 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Mar 2016 11:46:20 -0000 Authentication-Results: pb1.pair.com header.from=narf@devilix.net; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=narf@devilix.net; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain devilix.net designates 209.85.218.46 as permitted sender) X-PHP-List-Original-Sender: narf@devilix.net X-Host-Fingerprint: 209.85.218.46 mail-oi0-f46.google.com Received: from [209.85.218.46] ([209.85.218.46:35307] helo=mail-oi0-f46.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DB/E1-05006-B099AE65 for ; Thu, 17 Mar 2016 06:46:19 -0500 Received: by mail-oi0-f46.google.com with SMTP id w20so5678382oia.2 for ; Thu, 17 Mar 2016 04:46:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=devilix.net; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=eDzfwWTVuUS0p6FWjNviJaJnholJcayq47VlnE/qQeo=; b=I5R+pXJywxEa1A1cE2OXfOCuuMJfmKFOx0HaRZ217W3lskqi4+23aDYmPrpnpsIvRC NMVRXxQqaYFEDDcD+dnFvfaDZUP96JIUk/ddxed2eXRgu1VADbjt/YwinppiaZKiXouH Vq6mWGMevGTW+gGAWUBSmZMb+flmyT29yDUOs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=eDzfwWTVuUS0p6FWjNviJaJnholJcayq47VlnE/qQeo=; b=hlV/qME82vArkhR08JSZZA2UR+cuHbCU+uLHwfc3H6FQBmEZj82VyONvfouLkDvKww 4pshUXXBOk+LRUcxyhvhJ9pCF1rZFzQNEW89wWc7VO+ssz7GuPzd6u4vv9i1QFKLeUZq kRfKU7og1+opWnZGBvZE7WGBqBcnk18d6qfYB+OywLNGHZfYxADyoz/9EE6XL33aiQVn vamnmhM6WsEAhumjDWbMU9ec4B3wMXdlLfWEHEb4jR71yD4Fbp+khvO8LftDmAEMkQSN WxfO/Sz2g98bv8d1djQ+oaSSr+Hc/eGJDjr3FLVzsBpg9ivuHSZkWCZGFjLW94lfoEC+ zu0Q== X-Gm-Message-State: AD7BkJL72iSTR3uDBFd4afutuSkHdniwT9K34nfc1bqkyQto85ZR0BIHZixcsQi6Um/99G6LoBubhL6I5py+Pg== MIME-Version: 1.0 X-Received: by 10.202.104.204 with SMTP id o73mr5522346oik.18.1458215177013; Thu, 17 Mar 2016 04:46:17 -0700 (PDT) Received: by 10.202.175.74 with HTTP; Thu, 17 Mar 2016 04:46:16 -0700 (PDT) In-Reply-To: <56EA8EA9.80905@mprelu.de> References: <56EA8EA9.80905@mprelu.de> Date: Thu, 17 Mar 2016 13:46:16 +0200 Message-ID: To: Matt Prelude Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=001a114087aaa1e33e052e3d2dce Subject: Re: [PHP-DEV] [RFC Discussion] Typed Properties From: narf@devilix.net (Andrey Andreev) --001a114087aaa1e33e052e3d2dce Content-Type: text/plain; charset=UTF-8 Hi, On Thu, Mar 17, 2016 at 1:02 PM, Matt Prelude wrote: I'd support borrowing the "?" nullable annotation from HackLang for > people who want a less strict behavior: > > public ?string $name; > > This means that $name can either be a string or the NULL value. > Or, do it like with parameter type hinting: public string $name = null; Although I'm all for limiting NULL to only being the default value: $this->name = null; // this should throw a TypeError Cheers, Andrey. --001a114087aaa1e33e052e3d2dce--