Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:84460 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 44282 invoked from network); 9 Mar 2015 10:45:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Mar 2015 10:45:10 -0000 Received: from [127.0.0.1] ([127.0.0.1:18279]) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ECSTREAM id 51/A9-29848-4B97DF45 for ; Mon, 09 Mar 2015 05:45:08 -0500 Authentication-Results: pb1.pair.com header.from=shawn@heybigname.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=shawn@heybigname.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain heybigname.com designates 74.125.82.45 as permitted sender) X-PHP-List-Original-Sender: shawn@heybigname.com X-Host-Fingerprint: 74.125.82.45 mail-wg0-f45.google.com Received: from [74.125.82.45] ([74.125.82.45:36233] helo=mail-wg0-f45.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 61/96-29848-B5B6DF45 for ; Mon, 09 Mar 2015 04:43:56 -0500 Received: by wghk14 with SMTP id k14so22867215wgh.3 for ; Mon, 09 Mar 2015 02:43:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to :content-type; bh=2xFGsuoJpDiXEc3XdtVAczE7ifFOnGHQbrgPOGafQmI=; b=W5kNWXUeYgq11sWObilTnp5NYULl16A2uRRdT2z0UTVtVAAKntDn6Wpu4F2CxeJoBx GPikRqi9cifu54Exo1B8PIHQWalqrDeE1msH1E1eTP7ajwa8fg5sMdbEVKNiEvPjHnKW yidmnJMk2+AnueQdvM/F8pKAQ4F+gUizfLgHEzVmcBJz25oRPpvxvg3mNhTVhLa7Ukdg VeVYcqBqD2FDAVL7OpiNasvlIdN4uv+oAs/WsUxkIi7sdAz87JeI51EmwXQZDQGKJn7A 1QVHZGSJgXE0S93YrEEbx5mDUEnqnTUmQ0IB8xw9QP5XiRQ8aDZ+YfveyNr2H38qHCTc g5LA== X-Gm-Message-State: ALoCoQlUtsqmZDhLMnkoDoc5AH2gHFZoxLsLyXrpTKOB/Q/gigjhv/8Gc+GmpyhbWbBftFjnq/GX X-Received: by 10.194.121.10 with SMTP id lg10mr57125102wjb.71.1425894233016; Mon, 09 Mar 2015 02:43:53 -0700 (PDT) MIME-Version: 1.0 Received: by 10.180.19.10 with HTTP; Mon, 9 Mar 2015 02:43:32 -0700 (PDT) X-Originating-IP: [37.153.196.145] Date: Mon, 9 Mar 2015 10:43:32 +0100 Message-ID: To: internals@lists.php.net Content-Type: multipart/alternative; boundary=089e011771553f3a9e0510d7df55 Subject: Request Feedback for Instance Variable Sugar RFC From: shawn@heybigname.com (Shawn McCool) --089e011771553f3a9e0510d7df55 Content-Type: text/plain; charset=UTF-8 I've never submitted an RFC. Whether or not you're interested in the feature, please consider giving me feedback on the RFC itself so that I can better understand how to succeed in the process. ====== PHP RFC: Instance Variable Sugar ====== * Version: 0.1 * Date: 2015-03-09 * Author: Shawn McCool, shawn@heybigname.com * Status: In Discussion ===== Summary ===== In order to access instance variables, one must use the `$this->` prefix. The problem with this is that it reduces expressiveness in the language and increases the amount of unnecessary decoration, reducing readability. This RFC proposes a single character syntax sugar form of `$this->`. Instead, an `@` can be used to reference instance variables. The @ replaces the normal $ variable prefix. ===== Example ===== ===== Backwards Compatibility ===== Leave `$this->` available. ===== Proposed PHP Version(s) ===== This is proposed for the next PHP x, currently PHP 7. -- Shawn McCool | Big Name shawn@heybigname.com heybigname.com --089e011771553f3a9e0510d7df55--