Re: PATCH: Implementing closures in PHP

From: Date: Sun, 23 Dec 2007 11:15:12 +0000
Subject: Re: PATCH: Implementing closures in PHP
References: 1 2 3 4 5 6 7 8 9  Groups: php.internals 
Request: Send a blank email to internals+get-34231@lists.php.net to get a copy of this message
Hi! > Just a minor note; The semi-colon after the closing brace, seems > superfluous. Is there any reason for it? Unfortunately, yes. The problem is that the closure must be an expression so it can a) be assigned to a variable and b) returned directly. And since the expression is only a part of a statement, I can take no influence at that point in the grammar as to whether a semicolon should follow or not. I don't see any way of removing the semicolon without a) either making the language inconsistent and/or b) adding a lot of bloat to the grammar. Regards, Christian

« previous php.internals (#34231) next »