tag:blogger.com,1999:blog-6655746112052720933.post1187885586718197419..comments2022-03-30T18:43:33.525-05:00Comments on Notes on Haskell: The Closures are ComingAdam Turoffhttp://www.blogger.com/profile/11941071792943377879noreply@blogger.comBlogger8125tag:blogger.com,1999:blog-6655746112052720933.post-84249011129210865812008-09-11T22:31:00.000-05:002008-09-11T22:31:00.000-05:00D: Don't be cranky.Interesting post. I've notice...D: Don't be cranky.<BR/><BR/>Interesting post. I've noticed in C++ I've been using the pattern of using functors as closures quite a bit, without realizing I was using closures. The syntactic sugar that folks are proposing for C++ are intriguing in this respect, and would frankly save me quite a bit of hand-coding.<BR/><BR/>Binding environment and code anonymously and using it is more important than one might realize, and I agree with Adam's sentiment that a language without a way to do that in one form or another is really missing something.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6655746112052720933.post-227328213176220032008-09-08T17:25:00.000-05:002008-09-08T17:25:00.000-05:00Your statement that Java will get closures is actu...Your statement that Java will get closures is actually quite a stretch. Although the BGGA proposal looks strong, nobody expects it to be in the next version of the Java language, due in 2009 or perhaps 2010. There is no JSR (Java Specificiation Request) yet for Java 7 so nobody really knows the timetable, but it looks like we will have to wait for Java 8 to get closures.... maybe in 2012 or 2013?<BR/><BR/>This means we will have a world where Java is the only popular language without some form of first class functions. Even C will have closures... what an embarassment!<BR/><BR/>Of course, we have Scala for the JVM, and there's a compiler for Java+BGGA already. Probably more and more people will move away from the official Java language as it gets increasingly obsolete.Neil Bartletthttps://www.blogger.com/profile/08588098030811273044noreply@blogger.comtag:blogger.com,1999:blog-6655746112052720933.post-30262618679486617862008-09-08T13:25:00.000-05:002008-09-08T13:25:00.000-05:00C++ is getting them too. http://herbsutter.spaces....C++ is getting them too. <BR/><BR/>http://herbsutter.spaces.live.com/Blog/cns!2D4327CC297151BB!785.entry<BR/><BR/>The syntax is scary, though.Unknownhttps://www.blogger.com/profile/00254352620732798806noreply@blogger.comtag:blogger.com,1999:blog-6655746112052720933.post-24499966850804941702008-09-08T13:06:00.000-05:002008-09-08T13:06:00.000-05:00This is an awful blog post.1) Your language is vag...This is an awful blog post.<BR/><BR/>1) Your language is vague: talk of leaky abstractions without getting into details.<BR/><BR/>2) You use red herring arguments. You say that C was more relevant when computers were less powerful, but a huge amount of software is written in C or C++, neither of which have closures, and this software is used today. For instance the Python programming language is written in C.<BR/><BR/>3) You mistake work on a new language feature (adding closures to C) for a value judgment on the original language (C is "missing" closures and as such is an incomplete language).<BR/><BR/>4) Incredibly, you argue against diversity in programming languages: you argue that languages without closures are somehow not worthy of the term "programming language"Anonymoushttps://www.blogger.com/profile/11442714620753651697noreply@blogger.comtag:blogger.com,1999:blog-6655746112052720933.post-84640933052210635172008-09-08T10:18:00.000-05:002008-09-08T10:18:00.000-05:00In the context of closures in languages targeting ...In the context of closures in languages targeting JVM, if the underlying JVM doesn't support closures, how can the language do it -- with any efficiency?<BR/><BR/>And the jury will be out there for a long time :) There is no one true way to build software. There are too many diverse requirements and matters of taste. I doubt if I will ever see a clear judgment on static and dynamic languages let alone the other things you mention.Praki Prakashhttps://www.blogger.com/profile/14595449464113763495noreply@blogger.comtag:blogger.com,1999:blog-6655746112052720933.post-43901421213424327802008-09-08T07:21:00.000-05:002008-09-08T07:21:00.000-05:00Can't agree with your assessment of recursion, I'm...Can't agree with your assessment of recursion, I'm just a lowly programmer of business apps and use it on a regular basis.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6655746112052720933.post-3090367481764945892008-09-07T21:43:00.000-05:002008-09-07T21:43:00.000-05:00Thanks, Neal.Apparently, they were added in PHP 5....Thanks, Neal.<BR/><BR/>Apparently, they were <A HREF="http://www.php.net/archive/2008.php#id2008-08-01-1" REL="nofollow">added</A> in PHP 5.3 alpha 1. Their <A HREF="http://wiki.php.net/rfc/closures" REL="nofollow">status in the language</A> came earlier this year.Adam Turoffhttps://www.blogger.com/profile/11941071792943377879noreply@blogger.comtag:blogger.com,1999:blog-6655746112052720933.post-57172203716171750932008-09-07T19:05:00.000-05:002008-09-07T19:05:00.000-05:00Actually, PHP does have closures now.Actually, PHP does have closures now.Neal Gafterhttps://www.blogger.com/profile/08579466817032124881noreply@blogger.com