• swordsmanluke
    link
    fedilink
    arrow-up
    3
    ·
    1 year ago

    I can live with the forced indent in Python, but I really prefer Ruby’s “fluent” OO style vs Python’s more functional style.

    e.g. I prefer seeing operations in processing order like

    get_all_foos()
      .map{|foo| foo.id}
      .each {|id| report("found foo #{id}"}
    

    vs Python’s functional order

    [report(f"found foo {fid}") for fid in map(lambda x: x.foo_id, get_all_foos())]
    

    (Also, Python claiming useful variable names like type and id deeply annoys me)