Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:51229 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 4225 invoked from network); 6 Jan 2011 01:08:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Jan 2011 01:08:07 -0000 Authentication-Results: pb1.pair.com smtp.mail=johannes@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=johannes@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 217.114.211.66 as permitted sender) X-PHP-List-Original-Sender: johannes@php.net X-Host-Fingerprint: 217.114.211.66 unknown Solaris 10 (beta) Received: from [217.114.211.66] ([217.114.211.66:42502] helo=config.schlueters.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2C/E5-10843-CE5152D4 for ; Wed, 05 Jan 2011 20:08:07 -0500 Received: from [192.168.2.189] (ppp-93-104-125-137.dynamic.mnet-online.de [93.104.125.137]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by config.schlueters.de (Postfix) with ESMTPSA id 1C5DD4B08E; Thu, 6 Jan 2011 02:07:53 +0100 (CET) To: Martin Scotta Cc: internals@lists.php.net In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Organization: php.net Date: Thu, 06 Jan 2011 02:07:48 +0100 Message-ID: <1294276068.10675.3.camel@guybrush> Mime-Version: 1.0 X-Mailer: Evolution 2.30.2 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] RFC: about class names as values From: johannes@php.net (Johannes =?ISO-8859-1?Q?Schl=FCter?=) On Wed, 2011-01-05 at 21:53 -0300, Martin Scotta wrote: > $obj = newInstance( MyClass ); // notice. undefined constant MyClass This describes the major change with your idea. What happens if a constant MyClass exists? Another question is something like this: To proper support this we'd have to make classes first class elements. For making this consistent it would make sense to make functions first class elements. And best drop the $ in front of variables and create a new language. Everything else becomes a mess. johannes