KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I've got into the habit of using Closures everywhere I can in place of regular methods, even when I don't need access to free variables. So, I will use this: def addNumbers = { left, right -> left + right } .. instead of this: def addNumbers (left,right) { left + right } Is this bad practice? I far prefer the extra power I get when using closures over methods, and I far prefer the syntax. Thanks!
Tags (comma-separated)
Save Edits
Cancel