• FishFace@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    1 day ago

    I dunno, did we?

    Screenshot from the post

    I think rust’s iterator chains are nice, and IDE auto-complete is part of that niceness. But comprehension expressions read very naturally to me, more so than iterator chains.

    I mean, how many python programmers don’t even type hint their code, and so won’t get (accurate) auto-complete anyway? Auto-completion is nice but just not the be-all and end-all.

    • squaresinger@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 day ago

      Fair, I missed one word. You missed the whole blog post.

      It’s a big difference between writing code and writin APIs, tbh. If you write crap code that’s your problem. If you write crap APIs it’s the problem of anyone using your API.

      • FishFace@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 day ago

        The blog post is really about language design, because you definitely should not write a filter method for your custom iterable class in python; you should make it use the language’s interface’s for “being an iterable”. Language design involves APIs offered by the language, but isn’t really the purview of most people who write APIs.

        If a suggestion on language design would gain something at the cost of readability, anyone should be very skeptical of that.

        Those things together explain why I am evaluating the post mostly in terms of readability.