Perl people love closures. It's one of their common programming techniques. Closures in C? Way to screw its clarity and closeness to the real (or virtual) machine. And in the end closure or no closure doesn't change how the binary looks but allows programmers to pepper source with brain-teasers (now, what does _that_ evaluate to?). Not good at all.

--On Wednesday, September 02, 2009 10:04 +0200 Anant Narayanan <an...@kix.in> wrote:

Mac OS 10.6 introduced a new C compiler frontend (clang), which added
support for "blocks" in C [1]. Blocks basically add closures and
anonymous functions to C (and it's derivatives). Full details with
examples are in the linked article. I think the feature is quite elegant
and might be useful in cases where you want map/reduce like functionality
in C.

How much effort would it be to support a feature similar to blocks in 8c
(and family)? What are your thoughts on the idea in general?

--
Anant

[1] http://arstechnica.com/apple/reviews/2009/08/mac-os-x-10-6.ars/10






Reply via email to