this post was submitted on 30 Sep 2023
101 points (91.1% liked)

Programming

17526 readers
231 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] swordsmanluke@programming.dev 3 points 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)