You should probably assign an object to the underscore, otherwise any argument which is undefined will match:
js> var _
js> _ == undefined
true
Just doing "var _ = {}" should be sufficient.
edit: however, this conflicts with Underscore.js (http://documentcloud.github.com/underscore/), but if you put an "if (typeof _ === "undefined")" around the assignment you should be ok
I actually did a === check for just that reason, since if you define _ = {}, then passing in a real object that is {} will also return true for _ == {}
In pretty much any language which has a gettext implementation, "_" is the name used for the function/method/whatever which marks a string for translation. This is just as true in JavaScript (at least two JS gettext implementations that I know of use "_"). It's one of the few truly cross-language naming conventions I know of.
But libraries which expect to be able to use "_" for something other than gettext break this convention, and not only run the risk of screwing interoperability but also cause confusion for the (large number of) developers who are accustomed to "_" having a particular meaning.
True, but as long as _ is defined as a non-primitive type (namely an object or function) it can be used for both gettext (or underscore.js) and this currying function. All that's required for the currying is that comparison with anything other than itself is false.
edit: however, this conflicts with Underscore.js (http://documentcloud.github.com/underscore/), but if you put an "if (typeof _ === "undefined")" around the assignment you should be ok