Live data from Hacker News

Introducing Closure Tools

googlecode.blogspot.com

41–50 of 71 posts

Re: Introducing Closure Tools

#41
post #32
post #27

Earlier quoted context omitted.

I already find that hard enough - I've found that people tend to conflate first-class functions with closures.

Well, is there any real different between a first-class function and a closure that closes over nothing? Is it possible for a language to support closures without first-class functions? How common is it to have first-class functions without closures? (I think Python sort of had this arrangement, but I think this is fixed now.)

Haskell does not semantically have closures at all, because functions have only their arguments -- no scope to close over.

Lexically, there's where clauses to scope function definitions, but that gets desugared very early, and is really not the same thing at all anyway (the name binding is completely static).

Re: Introducing Closure Tools

#42

Earlier quoted context omitted.

"Closure" being a general concept in programming, I always disliked the name "Clojure". Same thing as Google Chrome, everyone is now confused when you talk about browser chrome as a general thing.

I agree that "Clojure" is kinda a silly name, but what else are you gonna call it? I assume Henly wanted a name that conveyed its functional and/or Lisp roots, and the fact that it's on the JVM. Let's try some names using the usual JVM language conventions: JLisp works, but it's boring, and Jisp sounds kinda suspect. Parenjases is just silly. Or maybe LLBeans for "lazy lisp beans"...but that's just getting too cute.…

In case people are wondering, here is how the Clojure name came about:

"Clojure is pronounced the same as the word "closure". The creator of the language, Rich Hickey, explains the name this way: "I wanted to involve C (C#), L (Lisp) and J (Java). Once I came up with Clojure, given the pun on closure, the available domains and vast emptiness of the googlespace, it was an easy decision.""

At least this is how it is outlined in this document:

http://java.ociweb.com/mark/clojure/article.html

Re: Introducing Closure Tools

#43

Earlier quoted context omitted.

I think most of the intended audience will not find 'Closure' confusing, because they are unaware of the concept that already has that name. The overlap of people interested in Clojure and people interested in Closure is rather small.

The overlap of people interested in Clojure and people interested in Closure is rather small. This entire thread is evidence against that point.

Unless HN somehow selects for people interested in lisp-like things...

Re: Introducing Closure Tools

#44
post #19

Earlier quoted context omitted.

Thats a terrible argument... He did indeed "announce Clojure to the world" before Google did, and now we all associate the phonetic name with him. Treat "closure" as a project name and pick a different product name, Google.

What about http://www.clozure.com/clozurecl.html ? I believe it was Clozure before Clojure was released (but I could be wrong).

How about the Closure web browser which predates both Clozure and Clojure?

http://www.cliki.net/Closure

Re: Introducing Closure Tools

#45

I'm pretty sure this is what Steve Yegge was talking about on the most recent StackOverflow podcast he was in. If that is accurate, it's a JavaScript compiler that supports a way of partially compiling to allow very tight integration with an IDE (or editor). Yegge's point was that an IDE or editor should not have to re-invent the wheel and a compiler should be able to provide sophisticated feedback about syntax, obje…

Yes here's the link http://blog.stackoverflow.com/2009/04/podcast-50/

Re: Introducing Closure Tools

#46
post #22
post #17

Would anyone who already knows this tool, or is taking the time to learn it, care to explain what they mean by "compiles web apps down into compact, high-performance JavaScript"? I assume this is a JS-to-JS translator. How exactly are they transforming the JS? I mean, of course, besides the obvious things they mention: minification, removing dead code, and some error checking.

Take a look here: http://code.google.com/closure/compiler/docs/api-tutorial3.h... When you turn on advanced mode they do automatic inlining, variable substitution, and they don't respect the globalness of anything unless you specifically force something to be global. YUI Compressor assumes anything not in a function is global, so it won't rename top level objects. Closure in advanced mode will trample through your gl…

I get concerned that these minimisers and js to js compilers will introduce subtle bugs and changes into the behaviour of my code. Is that concern warranted?

Re: Introducing Closure Tools

#47
post #2

What an unfortunate name. Perhaps, in the confusion, it will help to actually promote Rich Hickey's wonderful work.

I suspect the confusion will only affect people that don't need the specific implementations...

People that want Closure for their JS goodness will know which it is, similarly for Clojure and Clozure lisps. And I generally search out new tools by description rather than name, so the naming issue becomes more of a marketing issue than anything else, and given the name space, it does seem a relatively hot area at the moment...

At least they didn't go for something like GJST...

Re: Introducing Closure Tools

#48
post #22

Earlier quoted context omitted.

Take a look here: http://code.google.com/closure/compiler/docs/api-tutorial3.h... When you turn on advanced mode they do automatic inlining, variable substitution, and they don't respect the globalness of anything unless you specifically force something to be global. YUI Compressor assumes anything not in a function is global, so it won't rename top level objects. Closure in advanced mode will trample through your gl…

I get concerned that these minimisers and js to js compilers will introduce subtle bugs and changes into the behaviour of my code. Is that concern warranted?

Closure advanced mode will absolutely screw with your code.

Closure simple mode and YUI Compressor won't change the behavior of your code. They just rename completely encapsulated objects with shorter names and remove unnecessary semicolons.

Re: Introducing Closure Tools

#49

I'm pretty sure this is what Steve Yegge was talking about on the most recent StackOverflow podcast he was in. If that is accurate, it's a JavaScript compiler that supports a way of partially compiling to allow very tight integration with an IDE (or editor). Yegge's point was that an IDE or editor should not have to re-invent the wheel and a compiler should be able to provide sophisticated feedback about syntax, obje…

It's not compiling anything.

Re: Introducing Closure Tools

#50
post #33
post #32

Earlier quoted context omitted.

Well, is there any real different between a first-class function and a closure that closes over nothing? Is it possible for a language to support closures without first-class functions? How common is it to have first-class functions without closures? (I think Python sort of had this arrangement, but I think this is fixed now.)

A closure is just a (function, bindings) pair, so Python certainly has closures. The problem with Python is that there is no syntax for assigning to variables declared in an arbitrary scope, because there are no explicit declarations. As far as I understand, implicit local variables are what causes the problems in Python, not anything about closures, really. This causes other problems, too, such as those PG described…

Interesting. Thanks.
Post reply on HN