Re: [Haskell-cafe] Lambda and closures in PHP -- could someone please comment?

2008-06-22 Thread Richard A. O'Keefe
This is increasingly less relevant to Haskell, except of course to demonstrate what a nice language Haskell is. On 20 Jun 2008, at 11:34 pm, Jules Bean wrote: I think where I differ on you is how to map the semantics of a C- like language to explicit references. I would argue that the glyph "c"

Re: [Haskell-cafe] Lambda and closures in PHP -- could someone please comment?

2008-06-20 Thread Jules Bean
Derek Elkins wrote: Lambda abstractions should close over bindings. Full stop. Interesting. I agree with your analysis. I don't think I agree with your conclusion. The first "surprising" behaviour is the correct one. The latter would be broken. In my opinion, the reason this behaviour i

Re: [Haskell-cafe] Lambda and closures in PHP -- could someone please comment?

2008-06-19 Thread Alexander Wagner
CC to Christian Seiler http://www.haskell.org/pipermail/haskell-cafe/2008-June/044379.html http://www.haskell.org/pipermail/haskell-cafe/2008-June/thread.html On Wednesday 18 June 2008, Luke Palmer wrote: > * A closure must be able to call itself recursively (via a > higher-order function typicall

Re: [Haskell-cafe] Lambda and closures in PHP -- could someone please comment?

2008-06-19 Thread Alexander Wagner
On Wednesday 18 June 2008, Luke Palmer wrote: > I don't know that much PHP, but I find the "lexical" keyword to be a > nuisance. What are the semantics if the lexical keyword is omitted? In PHP Variables are local by default, the keyword global defines them as references to the global namespace

Re: [Haskell-cafe] Lambda and closures in PHP -- could someone please comment?

2008-06-19 Thread Derek Elkins
On Thu, 2008-06-19 at 07:25 +0100, Jules Bean wrote: > Richard A. O'Keefe wrote: > > The mutablity of r here really isn't a problem. Nor is the mutability > > of variables _as such_ really the problem in the PHP proposal. > > The problem is that it's the *same* variable every time. If PHP > > loo

Re: [Haskell-cafe] Lambda and closures in PHP -- could someone please comment?

2008-06-19 Thread Jules Bean
Richard A. O'Keefe wrote: The mutablity of r here really isn't a problem. Nor is the mutability of variables _as such_ really the problem in the PHP proposal. The problem is that it's the *same* variable every time. If PHP loops introduced new bindings on every iteration, this particular proble

Re: [Haskell-cafe] Lambda and closures in PHP -- could someone please comment?

2008-06-19 Thread Richard A. O'Keefe
On 19 Jun 2008, at 5:53 pm, Jules Bean wrote: Richard A. O'Keefe wrote: - what you get is a reference to a variable (as you do in Scheme) but loop variables really are variables, not names for values, so lambdas created in different iterations of the same loop point so the same loop variab

Re: [Haskell-cafe] Lambda and closures in PHP -- could someone please comment?

2008-06-19 Thread Jules Bean
Richard A. O'Keefe wrote: - what you get is a reference to a variable (as you do in Scheme) but loop variables really are variables, not names for values, so lambdas created in different iterations of the same loop point so the same loop variable, and do not remember the value it had whe

Re: [Haskell-cafe] Lambda and closures in PHP -- could someone please comment?

2008-06-18 Thread Richard A. O'Keefe
On 18 Jun 2008, at 4:36 pm, Karoly Negyesi wrote: (a) I would *never* want to use an implementation of closures like that. Could you elaborate on a) ? It wasn't me who wrote it, but consider - non-local variables are *not* captured unless you explicitly hoist them into the lambda expressio

Re: [Haskell-cafe] Lambda and closures in PHP -- could someone please comment?

2008-06-18 Thread Alex Sandro Queiroz e Silva
Hallo, PR Stanley wrote: Now, if you, Jules, Alex or some other wannabe Hitler have a problem with my freedom of expression then your best solution is to saddle up and get the hell out yourselves. This is the wrong place for setting up your tinpot dictatorship, Doctor! I am grateful for the h

Re: [Haskell-cafe] Lambda and closures in PHP -- could someone please comment?

2008-06-18 Thread PR Stanley
At 18:17 18/06/2008, you wrote: PR Stanley wrote: > > >>PR Stanley wrote: >> > >> > [...] >> > >> > Paul: I rest my case! :-) >> > you cowardly hypocrit! > > Paul: Why did you remove Jonathan Cast's message? Afraid somebody > might understand why I responded the way I did? > >> > >>Plea

Re: [Haskell-cafe] Lambda and closures in PHP -- could someone please comment?

2008-06-18 Thread Jim Burton
PR Stanley wrote: > > >>PR Stanley wrote: >> > >> > [...] >> > >> > Paul: I rest my case! :-) >> > you cowardly hypocrit! > > Paul: Why did you remove Jonathan Cast's message? Afraid somebody > might understand why I responded the way I did? > >> > >>Please take your own advice now, and rest

Re: [Haskell-cafe] Lambda and closures in PHP -- could someone please comment?

2008-06-18 Thread PR Stanley
> PR Stanley wrote: > > With respect, do you not think it'd be wiser for the community > > [snip] > > *disgusted* > > This is exactly the sort of message that haskell-cafe does not normally > contain. Let's not start now. > > This is a civilized mailing list. Either comment on the nice gentlemen

Re: [Haskell-cafe] Lambda and closures in PHP -- could someone please comment?

2008-06-18 Thread PR Stanley
PR Stanley wrote: > > [...] > > Paul: I rest my case! :-) > you cowardly hypocrit! Paul: Why did you remove Jonathan Cast's message? Afraid somebody might understand why I responded the way I did? > Please take your own advice now, and rest your case. Like it or not (I think most people do

Re: [Haskell-cafe] Lambda and closures in PHP -- could someone please comment?

2008-06-18 Thread Hans van Thiel
On Wed, 2008-06-18 at 09:46 +0100, Jules Bean wrote: > PR Stanley wrote: > > With respect, do you not think it'd be wiser for the community > > [snip] > > *disgusted* > > This is exactly the sort of message that haskell-cafe does not normally > contain. Let's not start now. > > This is a civ

Re: [Haskell-cafe] Lambda and closures in PHP -- could someone please comment?

2008-06-18 Thread Jim Burton
PR Stanley wrote: > > [...] > > Paul: I rest my case! :-) > you cowardly hypocrit! > Please take your own advice now, and rest your case. Like it or not (I think most people do like it), haskell-cafe has norms of behaviour that make it different to many pl mailing lists. Your sarky comments w

Re: [Haskell-cafe] Lambda and closures in PHP -- could someone please comment?

2008-06-18 Thread Evan Laforge
> * A closure must only keep alive the varables it references, not the > whole pad on which they are allocated (Python messed up here) Getting off subject, but I didn't know this about python. I'm not saying you're incorrect, but my experimentation shows: % cat t.py class A(object): def __in

Re: [Haskell-cafe] Lambda and closures in PHP -- could someone please comment?

2008-06-18 Thread Iain Barnett
On 18 Jun 2008, at 9:46 am, Jules Bean wrote: This is exactly the sort of message that haskell-cafe does not normally contain. Let's not start now. Reactions/arguments like the ones on this thread are perfect for Haskell - recursive and exponential. :) Could we have closure too? :-) So

Re: [Haskell-cafe] Lambda and closures in PHP -- could someone please comment?

2008-06-18 Thread PR Stanley
> >>It seems to me that if a PHP developer sees the Haskell community as > >>a resource for advice on programming language implementation, we > >>should take this as a compliment to the Haskell community. Repaying > >>that compliment with "your language sucks rocks" strikes me as unwise. > > >

Re: [Haskell-cafe] Lambda and closures in PHP -- could someone please comment?

2008-06-18 Thread Jonathan Cast
On Wed, 2008-06-18 at 16:00 +0100, PR Stanley wrote: > >>It seems to me that if a PHP developer sees the Haskell community as > >>a resource for advice on programming language implementation, we > >>should take this as a compliment to the Haskell community. Repaying > >>that compliment with "your

Re: [Haskell-cafe] Lambda and closures in PHP -- could someone please comment?

2008-06-18 Thread PR Stanley
It seems to me that if a PHP developer sees the Haskell community as a resource for advice on programming language implementation, we should take this as a compliment to the Haskell community. Repaying that compliment with "your language sucks rocks" strikes me as unwise. Not necessarily. It

Re: [Haskell-cafe] Lambda and closures in PHP -- could someone please comment?

2008-06-18 Thread Miguel Mitrofanov
On 18 Jun 2008, at 18:19, Seth Gordon wrote: It seems to me that if a PHP developer sees the Haskell community as a resource for advice on programming language implementation, we should take this as a compliment to the Haskell community. Repaying that compliment with "your language sucks

Re: [Haskell-cafe] Lambda and closures in PHP -- could someone please comment?

2008-06-18 Thread Luke Palmer
On Tue, Jun 17, 2008 at 4:45 PM, Karoly Negyesi <[EMAIL PROTECTED]> wrote: > Hi, > > The PHP community is discussing the adding of closures and lambdas to > the language, see the proposal at http://wiki.php.net/rfc/closures > > If someone with knowledge of both languages could take a quick look it

Re: [Haskell-cafe] Lambda and closures in PHP -- could someone please comment?

2008-06-18 Thread PR Stanley
It seems to me that if a PHP developer sees the Haskell community as a resource for advice on programming language implementation, we should take this as a compliment to the Haskell community. Repaying that compliment with "your language sucks rocks" strikes me as unwise. I'm familiar w

Re: [Haskell-cafe] Lambda and closures in PHP -- could someone please comment?

2008-06-18 Thread Seth Gordon
PR Stanley wrote: Blimey! Talk about rearranging the deckchairs :-) Today's xkcd seems apropos: http://xkcd.com/438/ It seems to me that if a PHP developer sees the Haskell community as a resource for advice on programming language implementation, we should take this as a compliment to the H

Re: [Haskell-cafe] Lambda and closures in PHP -- could someone please comment?

2008-06-18 Thread PR Stanley
> Now, if you, Jules, Alex or some other wannabe Hitler have a problem with > my freedom of expression then your best solution is to saddle up and get the > hell out yourselves. This is the wrong place for setting up your tinpot > dictatorship, Doctor! Just more evidence... http://en.wikipe

Re: [Haskell-cafe] Lambda and closures in PHP -- could someone please comment?

2008-06-18 Thread Luke Palmer
On Wed, Jun 18, 2008 at 1:42 PM, PR Stanley <[EMAIL PROTECTED]> wrote: > Now, if you, Jules, Alex or some other wannabe Hitler have a problem with > my freedom of expression then your best solution is to saddle up and get the > hell out yourselves. This is the wrong place for setting up your tinpo

Re: [Haskell-cafe] Lambda and closures in PHP -- could someone please comment?

2008-06-18 Thread Janis Voigtlaender
With respect, I will not engage in further communication on that level. PR Stanley wrote: PR Stanley wrote: With respect, do you not think it'd be wiser for the community [snip] *disgusted* This is exactly the sort of message that haskell-cafe does not normally contain. Let's not start now

Re: [Haskell-cafe] Lambda and closures in PHP -- could someone please comment?

2008-06-18 Thread PR Stanley
PR Stanley wrote: With respect, do you not think it'd be wiser for the community [snip] *disgusted* This is exactly the sort of message that haskell-cafe does not normally contain. Let's not start now. This is a civilized mailing list. Either comment on the nice gentlemen's PHP closure pr

Re: [Haskell-cafe] Lambda and closures in PHP -- could someone please comment?

2008-06-18 Thread Alex Sandro Queiroz e Silva
Hallo, Jules Bean wrote: PR Stanley wrote: With respect, do you not think it'd be wiser for the community [snip] *disgusted* This is exactly the sort of message that haskell-cafe does not normally contain. Let's not start now. This is a civilized mailing list. Either comment on the nice

Re: [Haskell-cafe] Lambda and closures in PHP -- could someone please comment?

2008-06-18 Thread Janis Voigtlaender
PR Stanley wrote: With respect, do you not think it'd be wiser for the community [snip] *disgusted* This is exactly the sort of message that haskell-cafe does not normally contain. Let's not start now. This is a civilized mailing list. Either comment on the nice gentlemen's PHP closure

Re: [Haskell-cafe] Lambda and closures in PHP -- could someone please comment?

2008-06-18 Thread PR Stanley
With respect, do you not think it'd be wiser for the community [snip] *disgusted* This is exactly the sort of message that haskell-cafe does not normally contain. Let's not start now. This is a civilized mailing list. Either comment on the nice gentlemen's PHP closure proposal from a lan

Re: [Haskell-cafe] Lambda and closures in PHP -- could someone please comment?

2008-06-18 Thread Jules Bean
PR Stanley wrote: With respect, do you not think it'd be wiser for the community [snip] *disgusted* This is exactly the sort of message that haskell-cafe does not normally contain. Let's not start now. This is a civilized mailing list. Either comment on the nice gentlemen's PHP closure pr

Re: [Haskell-cafe] Lambda and closures in PHP -- could someone please comment?

2008-06-18 Thread Karoly Negyesi
> Not to criticize, mind you --- the proposal looks excellent for what it > does. But I like what Haskell does worlds better. Obviously you like Haskell better given this mailing list :) I am not here to compare PHP and Haskell, I was just asking advice from people who know closures and lambdas

Re: [Haskell-cafe] Lambda and closures in PHP -- could someone please comment?

2008-06-18 Thread Jonathan Cast
On Wed, 2008-06-18 at 06:36 +0200, Karoly Negyesi wrote: > > (a) I would *never* want to use an implementation of closures like that. > > (b) Closures as proposed are *far* better than not having closures. > > Could you elaborate on a) ? I dislike the habit of implicit declaration --- strongly

Re: [Haskell-cafe] Lambda and closures in PHP -- could someone please comment?

2008-06-18 Thread Richard A. O'Keefe
I believe C# already has lambdas, and Java is supposed to be getting them. PHP is playing catchup, is all. (Oh, and Eiffel has 'agents', and I think I saw something about C++ Next Degeneration, and ...) Heck, the idea has only been around in computing since the 1950s... ___

Re: [Haskell-cafe] Lambda and closures in PHP -- could someone please comment?

2008-06-18 Thread Karoly Negyesi
> (a) I would *never* want to use an implementation of closures like that. > (b) Closures as proposed are *far* better than not having closures. Could you elaborate on a) ? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/m

Re: [Haskell-cafe] Lambda and closures in PHP -- could someone please comment?

2008-06-18 Thread Jonathan Cast
On Tue, 2008-06-17 at 18:45 +0200, Karoly Negyesi wrote: > Hi, > > The PHP community is discussing the adding of closures and lambdas to > the language, see the proposal at http://wiki.php.net/rfc/closures > > If someone with knowledge of both languages could take a quick look it > would be great

Re: [Haskell-cafe] Lambda and closures in PHP -- could someone please comment?

2008-06-17 Thread PR Stanley
But all the cool kids have em! Seriously though computer languages are about getting things done. If this gets more things done for the PHP community in ways easier/simpler/faster than before then it's a win. nerve gas would sort out the problem with mice in our building too, easier

Re: [Haskell-cafe] Lambda and closures in PHP -- could someone please comment?

2008-06-17 Thread Lanny Ripple
But all the cool kids have em! Seriously though computer languages are about getting things done. If this gets more things done for the PHP community in ways easier/simpler/faster than before then it's a win. They are after all /their/ deckchairs to play with. -ljr PR Stanley wrote: > Blimey!

Re: [Haskell-cafe] Lambda and closures in PHP -- could someone please comment?

2008-06-17 Thread Miguel Mitrofanov
Calm down, PR, that's not so bad, all we're going to see is an example of closures done wrong, nothing more. On 17 Jun 2008, at 21:46, PR Stanley wrote: Blimey! Talk about rearranging the deckchairs :-) With respect, do you not think it'd be wiser for the community to deal with a total lack

Re: [Haskell-cafe] Lambda and closures in PHP -- could someone please comment?

2008-06-17 Thread PR Stanley
Blimey! Talk about rearranging the deckchairs :-) With respect, do you not think it'd be wiser for the community to deal with a total lack of proper type checking, the lack of any notion of the general concept of a function, or a whole range of other fundamental issues in PHP first before worry

[Haskell-cafe] Lambda and closures in PHP -- could someone please comment?

2008-06-17 Thread Karoly Negyesi
Hi, The PHP community is discussing the adding of closures and lambdas to the language, see the proposal at http://wiki.php.net/rfc/closures If someone with knowledge of both languages could take a quick look it would be great. Thanks a lot Karoly Negyesi Ps. I am not a member of the PHP inter