On 6/18/08, Andi Gutmans <[EMAIL PROTECTED]> wrote:
> 1) I am not sure that the current semantics of the "lexical" keyword is
> great in all cases. Is the reason why you don't allow by-value binding so
> that we don't have to manage more than one lambda instance per declaration?
by-reference bi
Hi Christian,
This is a very nice piece of work. Definitely addresses a lot of the issues we
have raised in the past.
I would like to see such a solution make its way into PHP (see below re:
timing).
There are some things I'd like to consider:
1) I am not sure that the current semantics
On Tuesday 17 June 2008, Christian Seiler wrote:
> Hi,
>
> > - I am a little confused about the OOP interaction. How does a function
> > become a public method of the class?
>
> To clarify: the "public method" ist just the internal representation of
> the lambda function and has *nothing* to do wi
Christian Seiler wrote:
> As a followup to the discussion in January, I'd like post a revised
> patch to this list that implements closures and anonymous functions
> in PHP.
Did I miss seeing its phpt tests?
A really thorough test suite might the case for inclusion in PHP 5.3.
Chris
--
Christo
Hi,
Sorry for taking so long to answer, but I'm trying to catch up last stuff.
It's known that usually to optimize things for longer inputs you usually end
up making things for short inputs worst. So IMHO, I think you should have
the len==1 optimization and then use the KMP algorithm. Your impl
Hi!
I'm not Johannes and I didn't review the proposal in detail yet, but I
think we have enough for 5.3 right now. I'd think we better concentrate
on tying the loose ends and rolling beta out and then moving towards the
release than adding more and more features and never releasing it. 5.3
is
Hi!
nicely put but not in agreement with the PHP world. First we cannot add
a new feature like this in a mini release as it comes with an API change.
And second PHP is not anywhere close so we'd have to do it in a PHP 5.4
and personally I would like to avoid it.
You meant "PHP 6 not anywhere
Hi Markus, hi Stas,
Am Dienstag, den 17.06.2008, 12:19 -0700 schrieb Stanislav Malyshev:
[...]
> I'm not Johannes and I didn't review the proposal in detail yet, but I
> think we have enough for 5.3 right now. I'd think we better concentrate
> on tying the loose ends and rolling beta out and the
Hello Stanislav,
nicely put but not in agreement with the PHP world. First we cannot add
a new feature like this in a mini release as it comes with an API change.
And second PHP is not anywhere close so we'd have to do it in a PHP 5.4
and personally I would like to avoid it.
marcus
Tuesday, Ju
On 6/17/08, Stanislav Malyshev <[EMAIL PROTECTED]> wrote:
> I'm not Johannes and I didn't review the proposal in detail yet, but I
> think we have enough for 5.3 right now. I'd think we better concentrate on
> tying the loose ends and rolling beta out and then moving towards the
> release than ad
I'm not Johannes and I didn't review the proposal in detail yet, but I
think we have enough for 5.3 right now. I'd think we better concentrate
on tying the loose ends and rolling beta out and then moving towards the
release than adding more and more features and never releasing it. 5.3
is not
Hi!
Johannes, what's your take on this one for 5.3?
I'm not Johannes and I didn't review the proposal in detail yet, but I
think we have enough for 5.3 right now. I'd think we better concentrate
on tying the loose ends and rolling beta out and then moving towards the
release than adding mor
Hello Christian, Johannes,
Tuesday, June 17, 2008, 2:24:01 PM, you wrote:
> Hi Marcus,
> I now have revised my patch to include your suggestions:
> http://www.christian-seiler.de/temp/closures-php-5.3-2008-06-17-2.diff
> The changes to the previous version:
> - \0 at the start of the compil
>> What would rock is to have it supported by gcov (by us or
>> somewhere else with a public report), would it be possible?
>
> How can I get this done?
I'm adding Nuno to the loop, he is the one leading the gcov initiative
and will surely explain the setup in a better way than me :)
I can add
On Tue, Jun 17, 2008 at 2:21 AM, Steph Fox <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> Seems like you are missing some PHP programming basics. Strings are not an
>> array of chars, please go back to making ping pong in java c# or whatever
>> other little comp sci classes you took. PHP is not any of th
Hello,
Great patch and a much needed feature. One thing I do not agree with is the
point in the lexical key word, seems it should be natural to inherit the
outer scope. I guess the choice of adding lexical and going slightly against
the grain of typical closure implementations like scheme or ecmas
Hi Marcus,
I now have revised my patch to include your suggestions:
http://www.christian-seiler.de/temp/closures-php-5.3-2008-06-17-2.diff
The changes to the previous version:
- \0 at the start of the compiled lambda function name is dropped.
- lambdas which are class members are now marked
Hello,
I just updated wiki.php.net to the 2008-05-05 release [1]. No data
should have been lost. Aside from minor visual tweaks the main
improvement is that we now default to a diff in the RSS feeds.
We might see some other tweaks today (or over the course of the day).
The main thing we a
Larry Garfield wrote:
> $e = new Example();
> $lambda = $e->myMethod();
> $e->$lambda(5);
>
> That doesn't seem right at all, but that's how I interpret "Essentially,
> closures inside methods are added as public methods to the class that
> contains the original method." Can you give an example
Stefan Walk wrote:
> You're not learning from the mistakes of other languages (ruby in this case,
> which removed Enumerable from String in 1.9) ... "foreach" makes no sense for
> strings, because it's unclear what you want (with unicode terminology here,
> as this is for php6):
> "for each byt
d:\devel\php\php5\ext\phar\util.c(1832) : error C2036: 'void *' : unknown
size
d:\devel\php\php5\ext\phar\util.c(1864) : error C2036: 'void *' : unknown
size
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio
9.0\VC\BIN\cl.exe"' : return code '0x2'
Stop.
Index: ext/pha
Hi Marcus,
very nice work.
Thanks!
The only thing I don't like is the function naming
(ā\0__compiled_lambda_FILENAME_Nā). Can we drop the \0?
I used \0 because it is already used in two other places:
1) create_function (run-time lambda functions) uses \0__lambda_N
2) build_runtime_defin
Hello Christian,
very nice work. I think we should really add this to 5.3. The only thing I
don't like is the function naming (ā\0__compiled_lambda_FILENAME_Nā). Can
we drop the \0? For methods inside classes, do we have to provide real
private methods or do we support visibility fully? Or did you
Hi,
Let me introduce myself (as much as pertains to this letter): I am one
of the lead developers of Drupal core (Drupal, I believe, is quite
well known by now), I maintain the form API and the menu system. I do
not know much about PHP internals, but I spent most of the awake time
in the last four
On Tuesday 17 June 2008 08:27:37 Arvids Godjuks wrote:
> 2008/6/16 Edward Z. Yang <[EMAIL PROTECTED]>:
> > PHP userland code may not treat strings as first class arrays, but
> > that's certainly how they are represented internally.
> >
> > Anyway, it would be neat if we could get that foreach synta
Hi,
Seems like you are missing some PHP programming basics. Strings are not an
array of chars, please go back to making ping pong in java c# or whatever
other little comp sci classes you took. PHP is not any of them.
Foreach("foo" as $key => $char) {}, after learning, please be quiet and
let
a
2008/6/16 Chris Stockton <[EMAIL PROTECTED]>:
> Hello,
>
> On Sun, Jun 15, 2008 at 11:20 PM, Arvids Godjuks <[EMAIL PROTECTED]
> >
> wrote:
>
> > String is an array of chars, always was and is such in any programming
> > language. So I see argument for {} as missing knowledge for some
> programmin
Hi!
class Dynamic {
private $someVar = 5;
/// adding a function to instances from within the class
public function addMethodAtRuntime() {
$this->dynamicFunc1 = function() {
return $this->someVar; // expected to work
}
}
}
/// invoking dynamically added methods
///
Hi,
- I am a little confused about the OOP interaction. How does a function
become a public method of the class?
To clarify: the "public method" ist just the internal representation of
the lambda function and has *nothing* to do with the semantics of
calling the lambda itself. The "method" on
29 matches
Mail list logo