Hacker News new | ask | show | jobs
by zasdffaa 1459 days ago
> C has no concept of vectorization

OK, but vectorisation is exposed by the instruction set, as instructions[1]

> speculative execution, branch prediction, ... caches, MMUs

How would you expose speculative execution & branch prediction? Cache behaviour is well understood so what's wrong with it? What would you do to expose MMUs to the programmer, and what would they do with it/how would it help?

[1] but aren't there libraries that expose it just fine in a portable way?

1 comments

Speculative execution and branch prediction are adaptations to compensate for C's failings as a description of desired semantics.

But they are thoroughly ingrained into the technology, and will not easily be rooted out.

Your first sentence doesn't answer any question. The second is irrelevant. Please make some concrete suggestions.
There seems little value in "exposing" crap we would be better off not building in the first place.

The more expressive your language is, the less the runtime and hardware needs to guess about.

So what are the $%^&* semantics we're supposed to build into the language to avoid the need for speculation via OOO exec and branch prediction. Because as a guy interested in languages you might have something to teach me, assuming you have any idea what you're talking about.
Language design is hard.