MEL was probably fine for its intended uses - writing expressions and small scripts. But it is not well-designed as a progamming language, and that bites you when do try to do anything fancy with it.
The syntax really bothers me. I hate having to use string concatenation and backticks to construct function calls. The inability to nest calls is annoying. e.g.:
float $focal = eval("float $dummy = `getAttr " + $cam + ".focalLength`");
whereas I want to write:
float $focal = $cam.focalLength;
MEL’s type system is inadequate. Not only does it lack higher-level types like structures and first-class functions, but the types of many built-in functions don’t even make sense. e.g. getting the world-space position of an object, “xform -q -ws -t”, which should be a 3D point, instead returns an array of 3 floats. “xform -q -matrix” should return a matrix but instead it returns 16 floats. The API lacks all sorts of basic functions like vector/matrix multiplication, matrix transposition, inversion, etc.
MEL has some scoping problems, it doesn’t use ordinary lexical or dynamic scoping like “real” programming languages. I can’t point to a specific example, but I know I’ve stubbed my toe several times by thinking some variable went out of scope when it really hadn’t.
I would like a rudimentary exception-handling system for clean-up, e.g. if I open 3 files for output, then get an error, I want an easy way to delete the incomplete files.
I think the best solution would be to replace or adapt the API to an existing language that already has these features, like Python, Java, or Scheme. I do not believe having a large number of supported languages is a good thing in itself, but it’s important to have at least one good solid scripting language (in addition to the C++ API).
I think the packages that support N different programming languages are basically coming up with a generic object/class model and then expressing it within the type system of each different language (much like how Microsoft’s CLR runtime is accessible from all the .NET languages). This is OK but I think a lot of that effort is wasted, you only need one really good, well-integrated scripting language. I would personally choose Python for this. Java, Scheme, or even C# would be valid choices too. (garbage collection would be the major concern, although I think a simple mark-sweep system would take care of it)
Also Alias should think about some way to unify the C++ API with the scripting API. Currently MEL commands live in an entirely different world from the C++ API classes. The fact that you can do certain things in MEL but not C++, and vice versa, makes life difficult. (e.g. implementing a basic “hello world” DAG node involves 2-3 pages of C++ code, there should be a way to do it in 5-10 lines of script). I would like to see the C++ API classes and MEL join together, so you could access the C++ API in some logical way from the scripting language.
The MEL documentation, while thorough, makes it difficult to locate important information. e.g. it took me a LONG time to find out how to extract the knots and CV coordinates from a NURBS surface. (I would prefer to access these as attributes of a NURBS surface node, but instead they must be queried with a MEL command string)
On the positive side, I do like how much of Maya’s internals and GUI are actually implemented in MEL. I once found an answer by looking into Maya’s internal MEL scripts, which I could never have found if it were compiled to C++ code. I think if MEL were more powerful and a better progamming language, even more of the system could be implemented with it.
My guess is that MEL started out as a purely text-based language for sending and receiving strings from the Maya C++ API. They might have even started out using the Tk window toolkit, which would explain why the syntax resembles Tcl. Alias probably underestimated how much Maya end users wanted to expand the package with custom scripts. That explains why MEL has grown beyond its ability to support itself.