Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Those other models lack native mechanical sympathy with the hardware.

Let's be practical about it: the reason you might want to say map_tree is so it could potentially be optimized to run more quickly, e.g. via automatic parallelization.

But to even parallelize a tree read operation we'd have to pull in other threads, split work, we'd want metadata on each node (child counts), and at the end of the day within each worker you'd still have a serial execution order.

For map_tree to have practical benefit your language would need to make a ton of opinionated choices about trees and parallel programming. Feasible? Yes. Worth making it a basic primitive? Well, even LISPs don't offer map_tree, despite building the whole language on top of car/cdr.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: