Joel Bennett

Results 401 comments of Joel Bennett

@MartinSGill you've missed half of my quote there. This is a two-part project: Style Guide and Best Practices. I did say that "The style guide rules focus on readability" --...

Yes, that would make a great addition.

@maekee to sum up this long thread: In other programming languages with a `return` statement, the `return` statement is contractual: nothing returns output from a function _except_ the `return` statement....

You can't (shouldn't) use break or continue outside of a loop construct like foreach/for/do/while/switch -- they are for loops exclusively.

See [my summary](#issuecomment-236727676) with it's 8 up-votes? We just need to capture this in the docs and close it.

TIL `Write-Output -NoEnumerate` was **broken** on PowerShell 6 [for 16 months or longer](https://github.com/PowerShell/PowerShell/issues/5955). In summary: DO NOT USE Write-Output -- EVER.

Ugh. What I should do, is copy that into the book somewhere and close this thread. It's always _next_ weekend...

Yep, I agree with that. In general, camelCase for variables, but PascalCase for parameter names because parameters are expected to be PascalCase and it affects tab-completion/intellisense, etc. I'm not sure...

I don't think there _are_ any arguments for certain styles that can't be countered. Clearly it's "easier" to type lower case letters, but `$variable` vs `$Variable` is hard to argue...

As a general rule: use the _native_ capitalization for type names. The easiest implementation of that is to use the tab-completion value. This assumes you're using the built-in tab-completion... Normally,...