Hacker News new | ask | show | jobs
by throwup238 38 days ago
That’s like saying “surely a high level language can solve the halting problem.”

Yes, it can, but only by eliminating the features that make it Turing complete. It’s relatively easy to vectorize map with a closure that can’t mutate anything but once you have nontrivial control flow, the compiler can’t make those kinds of assumptions.

1 comments

It’s really not! We’re not requiring the language to make optimal choices, just that it convert the same code to these different paradigms (and honestly you could just brute force run the 12 versions and choose the fastest one). Absolutely no theory barriers apply!
You should design it!
Some kind soul pointed to Intel’s https://ispc.github.io/ which is basically this.

Missing some features but roughly has the idea. Keep faith with human ingenuity!