If X: function() turns into function X, then I suppose that X: function Y() turns into function X() as well, so there is no harm in overspecifying the name in the library either? In that case, I would just prefer specifying the names everywhere, since that allows to simply search for the string "function(" in a source file to see if it has any unnamed functions left in it.