Re: Another update: "Exploring Programming Language Architecture in Perl"
by BrowserUk (Patriarch) on Nov 15, 2006 at 07:32 UTC
|
I applaud you for chapter 13. That's the most cogent explanation of continuations and CPS I read. And I've read several.
In terms of feedback. I think you might reconsider the decision in the final paragraph of 13.2:
This time I haven't bothered to perform all of the possible tail call optimizations,
I think you leave your point unfinished by not showing the full conversion at that point. The first thing I did was attempt to complete the example. It may be that you see that as a good learning experience for the reader, but it took me a couple of attempts to get it right and when what I thought should work didn't after the first couple of attempts, it diluted the wow factor of the chapter to that point.
It left me with the antsy feeling that you avoided showing it because you felt that the full conversion might look too complicated at that stage of the chapter?
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] [Watch: Dir/Any] |
|
Thanks for your input.
You're right, the main reason I didn't complete all of the tco's was so as not
to unnecessarily clutter an already complex example. I'll take what
you've said on board though, and provide a completely optimized
version in addition.
Bill H
perl -e 'print sub { "Hello @{[shift]}!\n" }->("World")'
| [reply] [Watch: Dir/Any] [d/l] |
Re: Another update: "Exploring Programming Language Architecture in Perl"
by diotalevi (Canon) on Nov 17, 2006 at 20:58 UTC
|
| [reply] [Watch: Dir/Any] |
|
Cool! I've not had much of a chance to experiment, and I'm no expert on perl internals, but B::Utils looks like it might be perfect for doing implicit tail-call optimization at the very least, maybe even automated CPS transforms.
Bill H
perl -e 'print sub { "Hello @{[shift]}!\n" }->("World")'
| [reply] [Watch: Dir/Any] [d/l] |
|
| [reply] [Watch: Dir/Any] |
|
Re: Another update: "Exploring Programming Language Architecture in Perl"
by duff (Parson) on Nov 15, 2006 at 18:51 UTC
|
billh++ Based solely on what BrowserUk said, I went and read Chapter 13 and I have to agree--very well explained.
| [reply] [Watch: Dir/Any] |
Re: Another update: "Exploring Programming Language Architecture in Perl"
by educated_foo (Vicar) on Nov 17, 2006 at 04:24 UTC
|
I know this is a terrible nit to pick, but could you please go through the whole text reading "it's" as "it is", and "its" as "belonging to it", and correct the uses of "its" and "it's"? | [reply] [Watch: Dir/Any] |
|
Heh! :-)
Exactly the sort of editorial help I need.
I've actually bought a copy of "Eats, Shoots and Leaves", I guess I should probably read it :-)
Update I've made the changes locally. They'll be visible on the next update.
Bill H
perl -e 'print sub { "Hello @{[shift]}!\n" }->("World")'
| [reply] [Watch: Dir/Any] [d/l] |
|
| [reply] [Watch: Dir/Any] |
|