2014-04-03 12:05 GMT+02:00 Stefan Bodewig <bode...@apache.org>: > On 2014-04-03, Benedikt Ritter wrote: > > > I didn't now that '_' is a valid identifier at all. > > That's a different point. :-) > > _ is used as an identifier in many funtional languages to mean "any > argument, I don't care for it anyway" when you need to have an argument > for a certain contract but won't use it. This is exactly what I used it > for in the code Emmanuel changed. >
How about changing the name to "ignored" then? Benedikt > > In other contexts _ means "anything" when used for pattern matching. > You'll see that in Scala or F# or other ML inspired languages as well as > in Haskell. > > When used with the correct settings the C# compiler will complain about > method arguments that you don't use and if you prefix the argument name > by a _ (or just use _ if there is only one such argument) it will no > longer complain. I think this is where I finally picked up the habit. > > So I'm suprised Java8's compiler complains, I don't think it has done so > before or I would have noticed. > > Stefan > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org > For additional commands, e-mail: dev-h...@commons.apache.org > > -- http://people.apache.org/~britter/ http://www.systemoutprintln.de/ http://twitter.com/BenediktRitter http://github.com/britter