DEV Community

Discussion on: I prefer not to use the keyword “it”

Collapse
 
jillesvangurp profile image
Jilles van Gurp

It's not a keyword; it's a variable name. And you can refactor it to whatever simply by renaming. If you have nested blocks, you will get a warning about name shadowing if you don't do that. And of course you should not tolerate any warnings.

Your last example, you could shorten to

values.map(Name::of)
Enter fullscreen mode Exit fullscreen mode