News for hackers. Stuff that matters.
Re:What Makes Code Hard to Read: Visual Patterns of Complexi... by Archelaos on Wednesday March 12, 2025 @10:38AM (#43343752)
I think, an explicit type would make it even easier to grok:

  ISet<Author> authorsOfLongBooks =
    books
    .filter(book => book.pageCount > 1000)
    .map(book => book.author)
    .distinct()
    .toHashset()
Or whatever the equivalent for ISet<Author> is in the respective language. Or IReadonlySet<Author> if the set should be immutable.

There are no comments on this comment yet.