Skip to content

Conversation

@yaroslavya
Copy link
Contributor

As mode function ( https://github.com/stacktracejs/stacktrace.js/blob/master/stacktrace.js#L68 ) return right away, else keywords are not needed.

As every if have return statement else are not needed
@victor-homyakov
Copy link
Contributor

That's the matter of taste. mode had this else if style for years (almost from the initial commit), and it was well understandable and easily changeable. @eriwen what do you think?

@eriwen
Copy link
Member

eriwen commented Jan 23, 2014

I would agree with @yaroslavya if JS were a language that supported postfix conditions like CoffeeScript (e.g. return "foo" if bar but in this case I want it be clear to the reader that each option is mutually exclusive from one another.

If either of you feel strongly that this style is more correct, we can merge it but I don't see any advantage to doing so.

@victor-homyakov
Copy link
Contributor

If this change makes code more readable at least for two people, then I'm OK. Just one note. @yaroslavya please remove trailing space from empty lines before merge.

@yaroslavya
Copy link
Contributor Author

@victor-homyakov ok, seems no more trailing spaces.

victor-homyakov added a commit that referenced this pull request Jan 27, 2014
removed unneeded "else" statements
@victor-homyakov victor-homyakov merged commit aa25734 into stacktracejs:master Jan 27, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants