|
|
|
|
|
by krcz
2314 days ago
|
|
On the other hand most spoken languages use similar underlying concepts (with some exceptions, e.g. translation to language without subjective direction terms like "left" or "right" might be tricky). Programming languages can have completely different execution models, especially when you compare ones between paradigms. Translating imperative for loop into map/filter/fold chain in functional language would have to be very non-local. |
|
With enough effort and smart transformation passes however, I think you could come pretty close to something resembling "native" code. It might not always be worth it to spend that development time though.
[1] https://c2rust.com/