RFC: take advantage of package name to shorten types name
When writing a plugin or an application, it is quite common to use e.g. gst_audio::AudioFormat
, which appears redundant.
This RFC proposes to avoid name redundancy when the package name already gives context. Of course this would be a general guideline, there are probably specific cases where this wouldn't help.
In the above example, we would use gst_audio::Format
instead. If users really want to import the type, they could still pull it in scope like this:
use gst_audio::Format as AudioFormat;
Another related example is the native endians aliases, which are named gst_audio::AUDIO_FORMAT_...
. These must be used with the gst_audio::
prefix anyway, unless the user pulled them in scope with use gst_audio::*
.