What's your experience with using % for accessing object members?

With the caveat that they can only take two arguments, they actually do solve problem often mentioned. You can’t chain type-bound procedures, but you can chain type-bound operators. I.e.

things = set(stuff).union.set(more).intersection.set(others)

And if you do want to have more than two arguments, you can define a derived type to hold the extra “arguments”. I.e.

thing = dict.with.entry(key, val).get.with_default(other_key, default_val)

Another neat example (which my quaff library actually supports) would be something like

dist = 100.unit.miles.in.kilometers
14 Likes