-
Notifications
You must be signed in to change notification settings - Fork 293
Closed
Labels
Description
I think the Style Guide should just say:
Prefer
CmdletBindingbecause functions without CmdletBinding don't get common parameters and therefore do not behave the way users expect them to. For instance, when you call them with common parameters (like-Verboseor-WhatIfor-ErrorVariable), those parameters don't work as expected either.
I could add a few other reasons, mostly around the inconsistency and the fact that you frequently have to upgrade functions to CmdletBinding which changes their syntax, but my point is that I think the style guide and best practices should strongly recommend writing advanced functions, rather then providing style suggestions for them.
Anyone want to defend the use of non-advanced functions?