This article is from the FAQ, by with numerous contributions by others.
For most practical cases there is no maximum lenghth of a name. The length
of an name is currently limited by the representation of an abstract syntax
tree (AST). There is currently a limitation to the size of an AST. In the
AST representation, a 16-bit integer is used to represent the length of a
name. A name can thus in theory consist of more than 65000 characters.
However, it is much more likely that a BETA fragment breaks the limit of an
AST than an identifier becomes too large.