Thank you very much Petr for taking the time to write your detailed answers.
@"First you talk about performance, then you want to load two similar frameworks on each page, hmmm."
Please be careful - I do not want to load two Frameworks, I am forced to when I want to work with Moodle in a productive way. That is a big difference. Working with jQuery in many projects and being forced to learn YUI for Moodle work is expensive. Who do you think will be willing to pay for the extra time?
Have you ever spent a moment thinking about the fact that several well known Open Source projects have switched form any JavaScript to jQuery (Joomla, Wordpress, Drupal for example)? Or why several people in Moodle forums ask for jQuery?
jQuery is mainstream in the moment. The jQuery learning curve is much smaller than the YUI learning curve. You can get your job done in less time with jQuery than with YUI. There are lots of sources and books helping to solve jQuery tasks. Many people know how to work with jQuery and can get productive without an extra learning curve. That means for many people working with jQuery is less expensive than working with YUI.
Moodle's core JS framework is YUI - that's ok. What I have always been asking for is not to replace YUI by another framework but to be open and support elegantly incorporating other frameworks. The tendency among Moodle developers seams to be single minded and willing to exclude anything not part of the "Moodle way".
Moodle is not going to rule the competencies and preferences developers have - Moodle can either block out or integrate. From my point of view Moodle will suffer from blocking out and win with integrating.
Some examples about the success/failure with blocking/integrating strategies. Apple is winning by blocking. But they offer the best tools and support possible. Microsoft/Windows looses by trying to integrate anything. They have huge problems finding the right and easy way. UNIX/LINUX wins by integrating. The philosophy is open from the beginning. Not either blocking or integrating will be the right strategy by itself - but the way one or the other is handled and supported. Moodle will never be able to go the blocking "Apple way" - that's why I propose to go the integrating "UNIX way".
You have given some examples how handling jQuery integrating is possible like "2/ load it from $CFG->wwwroot/local/jquery/* local plugin (this is the right place for extra stuff in 2.0)" Ok. To get jQuery loaded with the dynamic loading (and blocking if possible) mechanisms of YUI loader would be much better than creating an extra solution. Do you have an idea how this could be done?