Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #26014
| From | Lew <noone@lewscanon.com> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Why “new”? |
| Date | 2011-02-05 09:22 -0500 |
| Organization | albasani.net |
| Message-ID | <iijmfr$bh3$1@news.albasani.net> (permalink) |
| References | <iii71v$3ud$1@lust.ihug.co.nz> <iiiqnu$ev4$1@lust.ihug.co.nz> |
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|
|_____|_____|
|===========|
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar
Why “new”? Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> - 2011-02-05 13:53 +1300
Re: Why ?new?? Owen Jacobson <angrybaldguy@gmail.com> - 2011-02-05 10:46 -0500
Re: Why “new”? Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> - 2011-02-05 19:29 +1300
Re: Why “new”? Lew <noone@lewscanon.com> - 2011-02-05 09:22 -0500
Re: Why “new”? Joshua Cranmer <Pidgeot18@verizon.invalid> - 2011-02-05 10:41 -0500
Re: Why “new”? Joshua Cranmer <Pidgeot18@verizon.invalid> - 2011-02-04 23:43 -0500
Re: Why “new”? Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-02-05 09:31 -0400
Re: Why “new”? Daniele Futtorovic <da.futt.news@laposte.net.invalid> - 2011-02-05 18:43 +0100
Re: Why “new”? Arne Vajhøj <arne@vajhoej.dk> - 2011-02-04 20:05 -0500
Re: Why “new”? "Mike Schilling" <mscottschilling@hotmail.com> - 2011-02-04 17:33 -0800
Re: Why “new”? Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> - 2011-02-05 14:53 +1300
Re: Why “new”? Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> - 2011-02-05 14:24 +1300
Re: Why “new”? Lew <noone@lewscanon.com> - 2011-02-04 23:47 -0500
Re: Why “new”? Daniele Futtorovic <da.futt.news@laposte.net.invalid> - 2011-02-05 02:09 +0100
csiph-web