What I was thinking was something like that:
function call_integration_hook($hook, $parameters = array())
{
global $modSettings, $settings, $db_show_debug, $context;
static $loaded_files = array();
if ($db_show_debug === true)
$context['debug']['hooks'][] = $hook;
$results = array();
if (empty($modSettings[$hook]))
return $results;
$prefixes = explode(',', $modSettings[$hook]);
// Loop through each function.
foreach ($prefixes as $prefix)
{
$prefix = trim($prefix);
if (!in_array($prefix, $loaded_files) && file_exists(SUBSDIR . '/' . strtr($prefix, '::', '_') . '.integration.php'))
{
require_once(SUBSDIR . '/' . strtr($prefix, '::', '_') . '.integration.php');
$loaded_files[] = $prefix;
}
if (strpos($prefix, '::') !== false)
{
$call = explode('::', $prefix);
$call[1] = $call[1] . '_' . $hook;
}
else
$call = $prefix . '_' . $hook;
// Is it valid?
if (is_callable($call))
$results[$function] = call_user_func_array($call, $parameters);
}
return $results;
}
So, instead of for example adding a hook like:
<hook hook="integrate_theme_include" file="LANGUAGEDIR/SPortal.english.php" />
<hook hook="integrate_load_theme" function="sportal_init" file="SOURCEDIR/Portal.subs.php" />
<hook hook="integrate_actions" function="sp_integrate_actions" file="SOURCEDIR/PortalIntegration.subs.php" />
<hook hook="integrate_admin_areas" function="sp_integrate_admin_areas" file="SOURCEDIR/PortalIntegration.subs.php"/>
<hook hook="integrate_load_permissions" function="sp_integrate_load_permissions" file="SOURCEDIR/PortalIntegration.subs.php"/>
<hook hook="integrate_whos_online" function="sp_integrate_whos_online" file="SOURCEDIR/PortalIntegration.subs.php"/>
<hook hook="integrate_frontpage" function="sp_integrate_frontpage" file="SOURCEDIR/PortalIntegration.subs.php"/>
<hook hook="integrate_quickhelp" function="sp_integrate_quickhelp" file="SOURCEDIR/PortalIntegration.subs.php"/>
<hook hook="integrate_buffer" function="sp_integrate_exit" file="SOURCEDIR/PortalIntegration.subs.php"/>
<hook hook="integrate_menu_buttons" function="sp_integrate_menu_buttons" file="SOURCEDIR/PortalIntegration.subs.php"/>
it would be:
<hook hook="integrate_theme_include" function="sportal" />
<hook hook="integrate_load_theme" function="sportal" />
<hook hook="integrate_actions" function="sportal" />
<hook hook="integrate_admin_areas" function="sportal" />
<hook hook="integrate_load_permissions" function="sportal" />
<hook hook="integrate_whos_online" function="sportal" />
<hook hook="integrate_frontpage" function="sportal" />
<hook hook="integrate_quickhelp" function="sportal" />
<hook hook="integrate_buffer" function="sportal" />
<hook hook="integrate_menu_buttons" function="sportal" />
That at some point may even be changed to:
<hook prefix="sportal" hook="integrate_theme_include,integrate_load_theme,integrate_actions,integrate_admin_areas,integrate_load_permissions,integrate_whos_online,integrate_frontpage,integrate_quickhelp,integrate_buffer,integrate_menu_buttons" />
And sportal.integration.php would have the functions:
function sportal_integrate_theme_include()
{
}
function sportal_integrate_load_theme()
{
}
function sportal_integrate_actions()
{
}
etc.
...mmm...no, not really... 
It's also because we already accepted some naming conventions (i.e. dispatcher), so I was wondering if it is worth to have some naming conventions here too.
Dunno if it is worth to do now, or even in general.
Yep, we could do that too.
Yep, I know...
I don't expect to have them stable "forever", but at least for a good period of time.