Loading...
Loading...
&#32; submitted by &#32; <a href="https://www.reddit.com/user/m-chav"> /u/m-chav </a> <br/> <span><a href="https://mchav.github.io/being-less-clunky/">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/programming/comments/1ssbk2i/pandas_feels_clunky_coming_from_r_what_about/">[comments]</a></span>
A little comparison between R and Kap
The author revisits a critique that pandas feels "clunky" compared with R’s tidyverse and asks whether Haskell data libraries feel the same. They reproduce the pandas vs R examples—reading CSVs, summing amounts, and grouping by country—and show Haskell alternatives using DataFrame, Frames, and Template Haskell. Simple tasks (reading CSV, head, sum) are straightforward in all languages, but Haskell examples introduce more ceremony: explicit types, Template Haskell declarations, and functional folds. That trade-off yields stronger type safety and declarative clarity for certain problems but can feel verbose and complex for incremental data exploration. The piece concludes that Haskell isn’t inherently clunkier, but its ergonomics differ from R’s interactive, mutation-friendly style.
The author revisits a comparison that labeled pandas “clunkier” than R and asks whether Haskell’s dataframe libraries feel clunky by the same measure. They reproduce the original CSV-loading and simple aggregation examples in R, pandas, Haskell’s dataframe package, and Frames (using Template Haskell), showing that reading data and head() equivalents are similar across ecosystems. Summing a column reveals Haskell’s friction: explicit types and extra boilerplate unless you introduce Template Haskell to declare columns, which trades fragility for complexity. Frames can be idiomatic and declarative but adds cognitive overhead as queries grow, especially for grouping and evolving business logic. The piece argues the tradeoffs are between ergonomics and static-typing/clarity rather than a simple clunkiness verdict.
&#32; submitted by &#32; <a href="https://www.reddit.com/user/m-chav"> /u/m-chav </a> <br/> <span><a href="https://mchav.github.io/being-less-clunky/">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/programming/comments/1ssbk2i/pandas_feels_clunky_coming_from_r_what_about/">[comments]</a></span>