Leeloo Minai Lekarariba-Laminai-Tchai Ekbat De Sebat... Do You have, uh, shorter name? ... Leeloo

- Leeloo Minai Lekarariba-Laminai-Tchai Ekbat De Sebat.
- That whole thing’s your name?
- Do You have, uh, shorter name?
- Leeloo...?
http://seanzdenek.com/2012/01/13/that-whole-things-your-name-captioning-names-in-the-fifth-element/

Is it my only temptation - ask for "shorter name", when I see something like this
string separator = System.Threading.Thread.CurrentThread.CurrentCulture.NumberFormat.NumberDecimalSeparator;

Under NDA :-) I can't provide really long name,
and even this example could be made shorter by using namespace, but...
anyway, this sample is OK to discuss possible manipulation with it.

And, actually, sometimes we should write the whole namespace things.
To avoid ambiguous error, or even this is a local code policy just in case.

I'd like to do accent not about namespaces only.
The most interesting (informative) part is written on the right part of "that long name", like enumeration exact named constant.

So, it could be hidden like this:
string separator = ...Culture<colored>.NumberFormat.NumberDecimalSeparator;

or like this:
string separator = System...NumberFormat.NumberDecimalSeparator;

or even like this:
string separator = System...CurrentThread...Culture.NumberFormat.NumberDecimalSeparator;

or any suitable regular expression FindAndReplace rules could be applied here,

May be to trigger this to looks like "shorter name", it must be defined MaximumLength, for example, anything longer 80 symbols should be appeared shorter,
or it should be binded to width of programmer code screen...

That rules, including regex (expanded) rules could be written at the moment, when team discussed code policy,
and then add by person applied at his only codefile, or his personal computer, or...

May be it'll be too little effect - for one string or even for one class.
But big weariness consist of huge number of little, but extra unnecessary efforts.

Please sign in to leave a comment.