Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:34664 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 57505 invoked by uid 1010); 10 Jan 2008 20:09:37 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 57490 invoked from network); 10 Jan 2008 20:09:37 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Jan 2008 20:09:37 -0000 Authentication-Results: pb1.pair.com header.from=derick@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=derick@php.net; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 82.94.239.7 as permitted sender) X-PHP-List-Original-Sender: derick@php.net X-Host-Fingerprint: 82.94.239.7 mail.jdi-ict.nl Linux 2.6 Received: from [82.94.239.7] ([82.94.239.7:36417] helo=mail.jdi-ict.nl) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5A/02-41364-08B76874 for ; Thu, 10 Jan 2008 15:09:37 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.jdi-ict.nl (8.13.7/8.12.11) with ESMTP id m0AK9VQL028528; Thu, 10 Jan 2008 21:09:31 +0100 Date: Thu, 10 Jan 2008 21:09:33 +0100 (CET) X-X-Sender: derick@kossu.ez.no To: Hannes Magnusson cc: Marcus Boerger , Ryusuke SEKIYAMA , internals@lists.php.net, Stanislav Malyshev In-Reply-To: <7f3ed2c30801100556y14b27d5es24eb8865b9f330e2@mail.gmail.com> Message-ID: References: <1665325616.20080110111902@marcus-boerger.de> <7f3ed2c30801100556y14b27d5es24eb8865b9f330e2@mail.gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=UTF-8 Subject: Re: [PHP-DEV] [RFC] Square brackets shortcut From: derick@php.net (Derick Rethans) On Thu, 10 Jan 2008, Hannes Magnusson wrote: > So you reject scalar type hinting because it isn't type casting and > can therefor confuses newbies - but scattering seemingly random > brackets around your code (to safe 5 key strokes) is obvious to users? > > Noone would confuse this with named arguments? > Why can't I do function foo([] $array) {} ? > > foo([]); > $var = []; > Is this really readable? > > Are you really serious about this? I have to agree with this. It looks all cool and nice and stolen from another language. But in the long end, all this does is saving you 5 chars to type, and lose a hell of a lot readability in the meanwhile. (In case it's not obvious: -1) regards, Derick