r/badcode •

[deleted by user]

[deleted] — view deleted post

0 Upvotes

82 comments sorted by

View all comments

Show parent comment

1

u/Fendor_ Jun 08 '20

Using `... <- pure $` instead of `let ... = `

That is actually not even an anti-pattern since it allows you to use name-shadowing.

1

u/_marzipankaiser_ Jun 09 '20

Which isn't needed here (Setting aside that even naming most of the parts here in the first place does hinder readability more than it helps).

But yeah, there could be uses for it. Although I'd argue that in most cases, shadowing is not a good idea because it makes it harder to know which definition you are currently referring to.