Java 7 feature Q.

0

00101010

Did they, like promised, add the waka waka shortcut for the instance
creation operator?
 
L

Lew

00101010 said:
Did they, like promised, add the waka waka shortcut for the instance
creation operator?

Of which "they" do you speak? There has never been a promise for Java to have a "waka waka" shortcut, whatever the heck that is, and Java doesn't have an instance creation operator.

Could you please clarify your question?
 
A

Andreas Leitgeb

Lew said:
Of which "they" do you speak? There has never been a promise for Java
to have a "waka waka" shortcut, whatever the heck that is,
and Java doesn't have an instance creation operator.

Isn't "new" an instance creation operator?

I've got a vague idea what he might have meant with "waka waka",
but I'll leave it to him to clarify.
 
A

Arne Vajhøj

Isn't "new" an instance creation operator?

I've got a vague idea what he might have meant with "waka waka",
but I'll leave it to him to clarify.

It seems as a good guess that he is asking about <>.

Arne
 
L

Lew

Arne said:
It seems as a good guess that he is asking about <>.

"seems", "guess"

How much wrong code is out there based on what "seems as a good guess" about what is specified?
 
R

Roedy Green

Did they, like promised, add the waka waka shortcut for the instance
creation operator?

I googled unsuccessfully. Waka Waka has meanings in the context of
African pop music and Pac Man games, but nothing I could find on Java.

Perhaps you mean something like my suggested Bali syntactic sugar:

http://mindprod.com/jgloss/bali.html

BigDate d = new BigDate( 1997, 5 , 6 );

could be abbreviated:

BigDate (1997, 5, 6) d;

This does not require any new keyword. Language designers have jumped
through hoops to avoid new keywords, e.g. in generics.
 
L

Lew

Roedy said:
, quoted or indirectly quoted someone who said :

I googled unsuccessfully. Waka Waka has meanings in the context of
African pop music and Pac Man games, but nothing I could find on Java.

I had similar results when I searched.
Perhaps you mean something like my suggested Bali syntactic sugar:

http://mindprod.com/jgloss/bali.html

BigDate d = new BigDate( 1997, 5 , 6 );

could be abbreviated:

BigDate (1997, 5, 6) d;

This does not require any new keyword. Language designers have jumped
through hoops to avoid new keywords, e.g. in generics.

Interesting and different guess from what Arne inferred. This does point up the need for clarification from the OP.

OTOH, this was never a promised "waka waka" for Java. Others have discussed elsewhere on the 'net (I think even in this newsgroup) the purpose of the'new' keyword for constructors to distinguish them from methods that (against convention and good sense) match the class name.

Personally I don't find the extra four characters it takes to type "new " worth the trouble of changing the language to eliminate the requirement for it. One can always follow Patricia Shanahan's and Joshua Bloch's advice touse a factory method instead of a public constructor. This eliminates theneed for a 'new' keyword in the expression, permits generic inference, allows power beyond mere construction, and admits of more expressive names than a mere copy of the class name, all without changing Java a whit. No "waka waka" required.
 
D

Dangling Pointer

Of which "they" do you speak?  There has never been a promise for Java to have a "waka waka" shortcut, whatever the heck that is, and Java doesn'thave an instance creation operator.

Could you please clarify your question?

Haven't you ever heard of waka waka bang splat tick tick hash?

<> !*''#
^"`$$-
!*=@$_
%*<> ~#4
&[]../
|{,,SYSTEM HALTED

Or if you prefer

Waka waka bang splat tick tick hash,
Caret quote back-tick dollar dollar dash,
Bang splat equal at dollar under-score,
Percent splat waka waka tilde number four,
Ampersand bracket bracket dot dot slash,
Vertical-bar curly-bracket comma comma CRASH.

So he means what I think the unimaginative Java drones at Oracle refer
to as the "diamond operator". I think.
 
L

Lew

Dangling Pointer said:
Haven't you ever heard of waka waka bang splat tick tick hash?

No.

It doesn't make sense to refer to both left angle bracket and right angle bracket by the same name.

The fact remains that it would've taken the OP less than five minutes to find the answer by reading the docs.
<> !*''#
^"`$$-
!*=@$_
%*<> ~#4
&[]../
|{,,SYSTEM HALTED

Or if you prefer

Waka waka bang splat tick tick hash,
Caret quote back-tick dollar dollar dash,
Bang splat equal at dollar under-score,
Percent splat waka waka tilde number four,
Ampersand bracket bracket dot dot slash,
Vertical-bar curly-bracket comma comma CRASH.

So he means what I think the unimaginative Java drones at Oracle refer
to as the "diamond operator". I think.

Nothing "unimaginative" about it. The term perfectly evokes the visual image of <> and helps prevent placing the angle brackets in the wrong order.

Certainly a more useful term than "waka waka", which evokes no visual imageand doesn't help discern the correct placement, and apparently is not as widely known as some seem to think.

I do object to calling it an "operator" without updating the JLS to includeit as one, although its components are listed. Since they haven't released a JLS with the language changes that I know of (someone please post a link if I'm wrong), perhaps that is pending, so I'll suspend criticism for now..
 
T

Tom Anderson

Of which "they" do you speak?  There has never been a promise for Java
to have a "waka waka" shortcut, whatever the heck that is, and Java
doesn't have an instance creation operator.

Could you please clarify your question?

Haven't you ever heard of waka waka bang splat tick tick hash?

<> !*''#
^"`$$-
!*=@$_
%*<> ~#4
&[]../
|{,,SYSTEM HALTED

Since when did this become a Perl newsgroup?

tom
 
J

Jim Janney

Dangling Pointer said:
Of which "they" do you speak?  There has never been a promise for Java to have a "waka waka" shortcut, whatever the heck that is, and Java doesn't have an instance creation operator.

Could you please clarify your question?

Haven't you ever heard of waka waka bang splat tick tick hash?

<> !*''#
^"`$$-
!*=@$_
%*<> ~#4
&[]../
|{,,SYSTEM HALTED

Or if you prefer

Waka waka bang splat tick tick hash,
Caret quote back-tick dollar dollar dash,
Bang splat equal at dollar under-score,
Percent splat waka waka tilde number four,
Ampersand bracket bracket dot dot slash,
Vertical-bar curly-bracket comma comma CRASH.

So he means what I think the unimaginative Java drones at Oracle refer
to as the "diamond operator". I think.

Up until today my education has been sadly deficient. Thanks!
 
R

Robert Klemme

:

Did they, like promised, add the waka waka shortcut for the instance
creation operator?

Of which "they" do you speak? There has never been a promise for
Java to have a "waka waka" shortcut, whatever the heck that is, and
Java doesn't have an instance creation operator.

Could you please clarify your question?

Haven't you ever heard of waka waka bang splat tick tick hash?

<> !*''#
^"`$$-
!*=@$_
%*<> ~#4
&[]../
|{,,SYSTEM HALTED

Since when did this become a Perl newsgroup?

Maybe JPerl is around the corner... Seriously, there seems to be a
tendency in the industry to create more and more languages which can be
executed on the JVM (see also JSR 292 which is part of Java 7).

Cheers

robert
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top