-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sat, Oct 01, 2005 at 01:50:20AM -0700, Angus Lees wrote:
> At Thu, 29 Sep 2005 18:38:31 +1000, Oscar Plameras wrote:
> > Is their equivalent codes for ff in  perl 6 ?
> 
> Sure, perl6 (just as in perl5) has coderefs.  In fact, these can be
> references to anonymous functions or dynamically created closures,
> which certainly can't be done in C.

Have you looked at how the mathmap plug-in for gimp works?

You type multi-dimensional equations (handling colour vectors,
space vectors, matricies, etc) then it writes out a C program
to a temp directory, compiles the program, and runs your image
through the program. Slightly scary but really no different
than doing an eval() in perl and mathmap handles chunky image
filtering with speed and ease (you don't even notice the compile
time).

Maybe that is a bit of an unfair example, a better question
would be whether the ability to not give a name to a function
is really so amazing or what makes a closure different to
a function pointer plus a data pointer. Certainly a lot of C
code is written as a function pointer plus a GLOBAL data block
(and library routines such as qsort() and bsearch() encourage
this by not providing an extra data pointer for the compar()
function) but any language can be misused.

Is global data really all that bad anyhow? At the end of the
day, something has to be global.

        - Tel
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iQIVAwUBQz/OJ8fOVl0KFTApAQJpAQ/+L/IiUjDMOTtLV00nT8nc512GCLOKo9U0
OYq3TXabvgCa4o1zjT4OZH9LbwFCc7ogN1xDXzf2gnRcSIOSVw498tEXvFVNTmRh
aEODvZd4w2r/LotbDm9q7a4CvW4bJhYV9sxtpzP9qe9lDZWtn/O+48rl3vlZspLX
bXJSZ1dEQ0YEAcRdXj/twefVzLRDCTf/n75ycchcJOng62GOkxbFo0o/VOKP81tb
vpsV0HzrYSQtqTN465HXmFCj0VgCeLzd4IZj9lJ04rdYHYV77qYOdkJx8TIDAt19
lmdyJgf5tnfpABaYiEIwQvWLIXu4t7uYWJqB5Ic/EwtRLv5aeInLtVUlfsQP5Ygr
Sn2Fqg59TQR7ylFDDsA2k7Uj2NPW+peFnVTPKq/hrsac1i/AT6VnZVFGKN2L+Jh1
J4XN4lWvI0riM08Hk1qUJYr8OsG5uAeMlIcwhBf0dKELmNNDyvznkbyz/XMb+G58
P4g7Cda4ODqQldeHWpnsvlYkzjOw4ER97pmEXHQwn8d205yUTMvs0Ki3fdTfjPo4
PGutvU+qWB/kczWy14CbmIE6sgdtMWt5shonmLjJfRzRQDJodUJBzEcd9NwCGgpG
tZl7Vo/ZazMZE7SEpDEECr3lp0CwJ50VLdq9KGhHJTyo6kE+6/VQgxWL/3dRwH3O
brTLHjY0WwU=
=tvUV
-----END PGP SIGNATURE-----
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to