Re: Why =?UTF-8?B?4oCcbmV34oCdPw==?=
On 02/05/2011 01:29 AM, Lawrence D'Oliveiro wrote:
In message<iii71v$3ud$1@lust.ihug.co.nz>, Lawrence D'Oliveiro wrote:
How many hundreds of times a day do Java programm[er]s write something like
classname varname = new classname(args);
And this just gets worse with generic types, e.g.
GenericClass<Type1, Type2> x = new GenericClass<Type1, Type2>;
OOOhh! You're right! That's simply TERRIBLE! I sure hope you didn't sprain
a finger with all that typing!
because Java has no typedefs like C++:
typedef GenericClass<Type1, Type2>
ShortName;
Unnecessary feature and one of limited benefit.
Or you could probably fudge it:
class ShortName extends GenericClass<Type1, Type2> {}
As long as 'Type1' and 'Type2' are actual types, as your nomenclature hints,
and not type parameters. 'ShortName' is not a typedef, though, it's a new type.
I think you'll just have to put up with typing Ctrl-V or letting your IDE
autocomplete all those horrible, finger-spraining, documentation-improving,
safety-guaranteeing, extremely low-overhead, helpfully redundant type
declarataions. Maybe you should wear a finger brace to relieve the strain.
Or spend a year tarring roofs to get a sense of perspective.
--
Lew
Ceci n'est pas une fen??tre.
..___________.
|###] | [###|
|##/ | *\##|
|#/ * | \#|
|#----|----#|
|| | * ||
|o * | o|
|_____|_____|
|===========|