Skip to content

Comment on Python, Machine Learning, and Language Wars. A Highly Subjective Point of Viewparent

Comments

They exist in Matlab too. They're called function handles. Matlab has functionalish functions like `arrayfun`, `cellfun` (akin to `map`) or `accumarray` (akin to `fold`), but the Matlab documentation prefers to teach loops, presumably because they're easier to understand, and usually faster in Matlab thanks to their JIT compiler.

I'm surprised that people are so surprised that you can pass function handles around, since there are some Matlab functions for solving ODEs or root-finding that are very commonly taught in intro courses that require function handles. I guess not everyone's first exposure to Matlab involves solving ODEs or root-finding.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.