[chuck-users] is there a way of doing "callbacks" ( i.e. passing function as argument to be called later ) ?

mike clemow michaelclemow at gmail.com
Thu May 24 13:39:03 EDT 2012

Hi All,

Henrique, I highly encourage you to take a deep look at Michael Heuer's
LiCK library.  There are some great things in there that take advantage of
a functional paradigm in a generally functional-unfriendly language.

And while we're talking about functional style and other nerdery, I submit
for your consideration my attempt to implement a Closure in Chuck to avoid
overmuch global state.  This should appeal to you JavaScript geeks out
there as well.  It's influenced by ideas in LiCK.  And while it's a bit
harder to read than your traditional Chuckian style, it's the most
bang-for-buck (in terms of lines of code) I could get out of Chuck in a
short session.

Comments most welcome.




On Wed, May 23, 2012 at 11:51 AM, Robert Poor <rdpoor at gmail.com> wrote:

> On Tue, May 22, 2012 at 3:19 PM, Michael Heuer <heuermh at gmail.com> wrote:
> > You might be able to hack [eval] by writing to a temp file and
> Machine.add'ing it.
> That is sooo deliciously nasty, and I don't see why it couldn't work.
> I wish I'd thought of it.
> _______________________________________________
> chuck-users mailing list
> chuck-users at lists.cs.princeton.edu
> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20120524/8ad99ac6/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: closure_noise3.ck
Type: application/octet-stream
Size: 924 bytes
Desc: not available
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20120524/8ad99ac6/attachment.obj>

More information about the chuck-users mailing list