QUOTE
Hmm, I hadn't really thought about putting it another way, could you further explain please.
Well see it comes down to how mel is related to the maya core. Its not sort of the tool you do computation with. So building control compuatation with mel is not exactly what you want. Mel is in sense a interfacing language, or journal language.
Some people instantly recongnize this for a fact once they see mel n more than one or 2 lines. Some do not because they have n such concept in their brain. I have found that explaining this thorughly is a bit hard. But i was reecently introduced to the original idea where it stems from so i have a better idea now. Tough mayas a very special offshot of this.
Thing is mayas core unit is the NODE, not script. So what you should eb doing is nodes that solve your problsm NOT code. In fact its very hard to do any sort of direct programming with mel. (this is why they added python totally perverting mayas core design, just wait 5 years and then tell me if it was good idea) This may seem like a limitation but brilliantly its not.
So maya script inetface wether or not its in mel consists of 3 things:
Controll logic and expressionsGui hooks and descriptionsNode creation and manipulation commandsThe gui in maya is separated form the rest so the way you approach doing anything in maya is by populating nodes to do your job with the express purpose of writing as little mel to node interfacing as possible. Now you don't really use mel to create nodes and thus any computation that you end up doing in mel is minimal. Hence mel doesn't need any complex data structuring capabilities becasue its expressly known that you wont be doing any algorithms in mel.
So any proper mel code will result in a comment like this:
QUOTE
this way uses no mel - is it still useful for you?
Wich is a misnomer, in actuality they DID use mel because the act of creating nodes is expressly domain of mel. So he cant create anything if it wasn't for the mel (or should we call it scripting) layer.So anytime somebod who is not a programmer suggests a solution without mel shows that they are better attuned to do mel than anybody who didn't. So mel is sort of a just a way to encapsulate things users do for faster interaction. Vrey rarely does this translate to extending maya or actually never. If you could do it with mel then maya expressly could do it already.
So any time your doing computation in mel your very likely doing it on the worng side of interface. Mel is just a sortof way for you to describe in text for covinence with some logic to make it more verastile.
Now then theres 1 thing that bridges the gap, its sort of in between, its teh expression engene sued in expression nodes and particle expression nodes. They should only use the subset ]Controll logic and expressions inside them and use the special expression nodes only syntax for inetrafceing. Leaving all/most mel comends outside the loop.
If you wish to do nodes its a EXPLICIT JOB FOR THE API.
For the gui teh thing si different, for this end maya provides extenssive querrying capabilities so you can build interfaces between theese. In teh gui you do have full progamming controll over things altough slightly indirectly. Dont mix thees up.
Knowing maya is knowing how to use mel even if you don't write mel. Writing mel as code is not the best use of your time.