in reply to Re: Is there a difference in this declaration?
in thread Is there a difference in this declaration?
Regarding team/environment:
If the OP's team is exposed / used to C-style programs where initialization must be done or BadStuffHappens(TM), then I'd go for the explicit initialization in order to reduce mental context switching.
If the OP's team is used to Perl or similar languages then I'd go for brevity and skip the explicit initalization since it leads to shorter code. ('short' as in 'as short as necessary', not as in 'as short as possible')
Or one could argue that you (generic you) should always go for a perlish mindset and remove anything non-perlish. Pick an option that's suitable to you and your team and apply it consistently - TMTOWTDI...
|
|---|