Skip to content

Arrowhead anti-pattern in examples #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
SantiagoTorres opened this issue Sep 26, 2016 · 2 comments · Fixed by #21
Closed

Arrowhead anti-pattern in examples #3

SantiagoTorres opened this issue Sep 26, 2016 · 2 comments · Fixed by #21

Comments

@SantiagoTorres
Copy link

SantiagoTorres commented Sep 26, 2016

I think we should avoid arrowhead anti-patterns as much as possible. I do see that they are put all throughout the suggestions. While this doesn't explicitly say "do arrowhead code," it invites new programmers to do it.

We should update the specification to avoid this.

Update: After re-reading, it seems that this happens mostly here and it's not as widespread as I thought.

@JustinCappos
Copy link
Contributor

Sure, please propose an edit and we can add this.

@lukpueh
Copy link
Member

lukpueh commented Nov 18, 2020

@SantiagoTorres, I just overhauled the style guide in #21 and removed the recommendation that has the problematic example you mentioned.

I did open a discussion about wether we really want to remove the recommendation (#21 (comment)). But others want to keep it, we definitely have to revise the example to not recommend the arrowhead anti-pattern.

FYI, I also added a note about that anti-pattern in another example that recommends the "return early" pattern.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants