Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

why ** is slightly different between Ant and Java 7

 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34383
346
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The code and scenario are here

It ends with:
The Ant approach probably feels more natural to me because I’ve been using it longer. But the Java approach seems more logical because it doesn’t have the extra slash that doesn’t actually get matched.


Which approach do you find more natural? I suspect the Java once, but I'd like to see if that reality matches for someone who hasn't used Ant.
 
Bill Gorder
Bartender
Posts: 1682
7
Android IntelliJ IDE Linux Mac OS X Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I like the Ant one, but like you I have used so many frameworks that have adapted the Ant style pattern matching that I am probably just used to it.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34383
346
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bill Gorder wrote:I like the Ant one, but like you I have used so many frameworks that have adapted the Ant style pattern matching that I am probably just used to it.

Interesting. Can you give an example of a framework that uses the Ant style? I wasn't aware it was adopted elsewhere. (it isn't surprising though)
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34383
346
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Of course. I've even used that feature in Spring. I didn't notice the style of ** because I just assumed it always worked that way! Thanks for reminding.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic