Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Java 7 feature Q.

Reply
Thread Tools

Java 7 feature Q.

 
 
00101010
Guest
Posts: n/a
 
      08-13-2011
Did they, like promised, add the waka waka shortcut for the instance
creation operator?
 
Reply With Quote
 
 
 
 
Lew
Guest
Posts: n/a
 
      08-13-2011
"00101010" wrote:
> 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?

--
Lew
 
Reply With Quote
 
 
 
 
Andreas Leitgeb
Guest
Posts: n/a
 
      08-13-2011
Lew <(E-Mail Removed)> wrote:
> "00101010" wrote:
>> 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.


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.

 
Reply With Quote
 
Lew
Guest
Posts: n/a
 
      08-13-2011
Andreas Leitgeb wrote:
> Lew wrote:
>> "00101010" wrote:
>>> 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.

>
> Isn't "new" an instance creation operator?


No, it is not, because it is not a Java operator.

--
Lew
 
Reply With Quote
 
Arne Vajh°j
Guest
Posts: n/a
 
      08-13-2011
On 8/13/2011 3:17 AM, Andreas Leitgeb wrote:
> Lew<(E-Mail Removed)> wrote:
>> "00101010" wrote:
>>> 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.

>
> 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

 
Reply With Quote
 
Lew
Guest
Posts: n/a
 
      08-13-2011
Arne Vajh°j wrote:
> Andreas Leitgeb wrote:
>> Lew wrote:
>>> "00101010" wrote:
>>>> 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.

>>
>> 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 <>.


"seems", "guess"

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

--
Lew

 
Reply With Quote
 
Lew
Guest
Posts: n/a
 
      08-13-2011
Arne Vajh°j wrote:
> Andreas Leitgeb wrote:
>> Lew wrote:
>>> "00101010" wrote:
>>>> 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.

>>
>> 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 <>.


If what "seems as a good guess" is anywhere close to accurate it's an easy question to find out the answer to with a simple and rapid search.

http://lmgtfy.com/?q=Java+7+new+features

--
Lew
 
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      08-13-2011
On Fri, 12 Aug 2011 22:03:19 -0400, 00101010
<(E-Mail Removed)> wrote, quoted or
indirectly quoted someone who said :

>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.
--
Roedy Green Canadian Mind Products
http://mindprod.com
Most of computer code is for telling the computer
what do if some very particular thing goes wrong.
 
Reply With Quote
 
Lew
Guest
Posts: n/a
 
      08-14-2011
Lew wrote:
> Andreas Leitgeb wrote:
>> Lew wrote:
>>> "00101010" wrote:
>>>> 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.

>>
>> Isn't "new" an instance creation operator?

>
> No, it is not, because it is not a Java operator.


The complete list of Java operators is in the JLS:
<http://java.sun.com/docs/books/jls/third_edition/html/lexical.html#3.12>
<quote>
The following 37 tokens are the operators, formed from ASCII characters:

Operator: one of
= > < ! ~ ? :
== <= >= != && || ++ --
+ - * / & | ^ % << >> >>>
+= -= *= /= &= |= ^= %= <<= >>= >>>=
</quote>

--
Lew
 
Reply With Quote
 
Lew
Guest
Posts: n/a
 
      08-14-2011
Roedy Green wrote:
> "00101010" wrote, quoted or indirectly quoted someone who said :
>> 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.


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.

--
Lew
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I switch on the Java Security feature in IE6 and Firefox too? Sandra28 Computer Support 2 11-15-2006 07:20 PM
Fixing and Continuing feature for Java IDE? mtczx232@yahoo.com Java 9 06-02-2006 06:17 PM
Feature of Sun Java 2 winwin Java 4 04-19-2004 07:17 AM
Java Feature Proposal christopher diggins Java 18 02-10-2004 07:51 PM
Full Screen feature in Java ? KS Java 5 11-09-2003 01:41 AM



Advertisments