Hacker News new | ask | show | jobs
by jcheng 3116 days ago
FYI, the pipe operator for R (and other languages that have it built in) are for calling any functions with any parameter types. This is not just academic, in the tidyverse style it's both common and idiomatic to change object types in the middle of a pipeline (for example, from a data frame to a vector, or from JSON to data frame to an interactive Leaflet map).

While Python decorators and operators can get you surprisingly far, I just don't see them being in the same league as languages like Lisp and R that let you manipulate the AST really easily.

Agreed though that the culture of Python is the exact opposite of R (and Ruby, Perl, Lisp), and even if Python had all the same metaprogramming goodies as R you wouldn't see as widespread use.