I understand that global variables are convenient for extending WordPress. However, it is also dangerous since someone can inadvertently write into the global variable, affecting the entire system. Instead of providing access to the variables directly, can WordPress provide a set of global functions that return the variable? For example
getDB()->query();
instead of
$wpdb->query();
This will not enforce but allow global variables to read from, without using the explicit global variable.
If someone wants to write into them, he/she can choose to use the explicit global variable.