Characters of Lie algebras and related algebras (both in zero and prime characteristic) fit into a larger class of special functions of, essentially, q-hypergeometric type, that is, solutions of certain regular q-difference equations. Basic phenomena of representation theory, like the appearance of a submodule under a specialization of parameters, have analytic counterparts in this broader setting. My goal in this talk is to explain the enumerative geometry perspective on both the representations and q-difference equations in question, following ideas from joint projects with Roman Bezrukavnikov and Mina Aganagic.