Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:35677 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 8812 invoked by uid 1010); 21 Feb 2008 06:56:01 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 8797 invoked from network); 21 Feb 2008 06:56:01 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Feb 2008 06:56:01 -0000 Authentication-Results: pb1.pair.com smtp.mail=greg@chiaraquartet.net; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=greg@chiaraquartet.net; sender-id=unknown Received-SPF: error (pb1.pair.com: domain chiaraquartet.net from 38.99.98.18 cause and error) X-PHP-List-Original-Sender: greg@chiaraquartet.net X-Host-Fingerprint: 38.99.98.18 beast.bluga.net Linux 2.6 Received: from [38.99.98.18] ([38.99.98.18:45651] helo=mail.bluga.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E0/42-20678-F702DB74 for ; Thu, 21 Feb 2008 01:56:00 -0500 Received: from mail.bluga.net (localhost.localdomain [127.0.0.1]) by mail.bluga.net (Postfix) with ESMTP id C6DAAC0F51F for ; Wed, 20 Feb 2008 23:55:56 -0700 (MST) Received: from [192.168.0.106] (CPE-76-84-4-101.neb.res.rr.com [76.84.4.101]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.bluga.net (Postfix) with ESMTP id 8E758C0F510 for ; Wed, 20 Feb 2008 23:55:56 -0700 (MST) Message-ID: <47BD207C.2080905@chiaraquartet.net> Date: Thu, 21 Feb 2008 00:55:56 -0600 User-Agent: Thunderbird 2.0.0.6 (X11/20071022) MIME-Version: 1.0 To: internals Mailing List X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP Subject: Trait aliasing syntax suggestions From: greg@chiaraquartet.net (Gregory Beaver) Hi, Here is a slightly clearer syntax for trait instantiation and for aliasing/removing method names from traits: Simply re-using "trait" instead of "use" is a more self-documenting solution. I found it slightly confusing to see "use" when that is a namespace-specific token currently. This is also in keeping with the way functions are defined in interfaces vs. implementation, but in reverse (for traits, brackets are used for declaration, semi-colon used for instantiation). Obviously, using "unset" is more similar to current PHP ideas on how to remove something, and the "as" syntax is also very PHP-ish, these will be far more self-documenting than the proposed syntaxes I've read thus far. Greg