Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:66164 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 22899 invoked from network); 22 Feb 2013 21:29:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Feb 2013 21:29:16 -0000 Authentication-Results: pb1.pair.com header.from=rasmus@mindplay.dk; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=rasmus@mindplay.dk; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain mindplay.dk from 209.85.212.50 cause and error) X-PHP-List-Original-Sender: rasmus@mindplay.dk X-Host-Fingerprint: 209.85.212.50 mail-vb0-f50.google.com Received: from [209.85.212.50] ([209.85.212.50:41417] helo=mail-vb0-f50.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 01/C5-26685-B23E7215 for ; Fri, 22 Feb 2013 16:29:16 -0500 Received: by mail-vb0-f50.google.com with SMTP id ft2so682257vbb.23 for ; Fri, 22 Feb 2013 13:29:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to :content-type:x-gm-message-state; bh=B4iEeVk1eAdVD+jcuT7y6OeBhDNqYggkZQtlkj8+3PM=; b=Gid+VbBxDsSduB8ZUu4c05hZhpdYnETuFL8KRoABZ8ZqcLT0Qb58b+1nc6kUW7lw8h vH/Q8mBoyW+yel75MeFvvtfAv/VHkadpi09fUUoq0HU0pHcGzA3DU064IKkKCghcn34v Q7Sya7vOTu4SEdTfBAfpyweuKdSxUq7NBf9xNvGcSTMIqWfgq/9JlOmE0XQKu2IaU+2H ZVp/YnCsmd8z+pTVwZoFUksMchpCyRFZAdnNK0a97tgOJnV1KOja6XPNpRPdLPJfxm+1 lqZQOUdeutlIx5/cjx+HhbUotBpuuOHc+SToByvlHpL5IDCKCbY93S0LXK1Nqsz6hyyi 4ZYA== MIME-Version: 1.0 X-Received: by 10.52.19.200 with SMTP id h8mr4044072vde.60.1361568553090; Fri, 22 Feb 2013 13:29:13 -0800 (PST) Received: by 10.58.102.137 with HTTP; Fri, 22 Feb 2013 13:29:12 -0800 (PST) Date: Fri, 22 Feb 2013 16:29:12 -0500 Message-ID: To: PHP internals Content-Type: multipart/alternative; boundary=20cf307ca04cf1bd8f04d656e1c7 X-Gm-Message-State: ALoCoQnm7lFUBT6/tJvyghbVsdsbP6WQu6afc1Dv//5LSxovzuwXOoC6sSgPIqg5JfukuSg1P20p Subject: rfc:trailing-comma-function-args From: rasmus@mindplay.dk (Rasmus Schultz) --20cf307ca04cf1bd8f04d656e1c7 Content-Type: text/plain; charset=ISO-8859-1 I've been thinking about this RCF for a while now: https://wiki.php.net/rfc/trailing-comma-function-args It just doesn't seem necessary - the only time I've ever found something like this to be necessary, is when a function takes closures or other very long arguments, some of which are optional... but actually, writing this in a VCS-friendly way is already possible: $tree->traverse( $tree , function($node) { // ... } ); ... version 2 ... $tree->traverse( $tree , function($node) { // ... } , function($node) { // ... } ); This actually comes out more legible, in my opinion. What really irks me about this patch, is that the trailing comma implies that another optional argument may exist - it really doesn't make the code more intuitive to read. The example on the page (using fopen) really isn't a realistic use-case - who would break a couple of simple arguments into individual lines like that? Just my two cents... - Rasmus --20cf307ca04cf1bd8f04d656e1c7--