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

A bunch of things a compiler "going downwards" needs to do don't apply, e.g. you don't need to worry about registers and things like that. And there's potentially more complex concepts to map to instead of just breaking source-language concepts down.

Haven't seen that terminology applied to individual passes.



Most compilers don't have to worry about registers nowadays, since they compile to LLVM or C.


It was just an example of a task. Also, "compile to LLVM" is very much "LLVM is part of the compiler, and thus worries about registers". Compile to C is (depending on source language and exactly which definitions you use) potentially also a transpiler.


Eh, I don't really see what this term gives us... So C2Rust is a compiler too, since Rust is compiled to LLVM?


> So C2Rust is a compiler too

All transpilers are compilers.

C2Rust is a transpiler and a compiler.

Not all compilers are transpilers.

Graal for example is a compiler but not a transpiler.

Just like all cheese burgers are burgers but not all burgers are cheese burgers. Nobody questions the term ‘cheese burger’ because we already have the word ‘burger’.


Yeah, because a cheese burger has cheese. What does a transpiler have? What is the common factor between all transpilers? Who decides on this layering of which languages are higher level or lower level? C2Rust doesn't call itself a transpiler, it calls itself a translator.

This term seems completely useless to me.


> What does a transpiler have? What is the common factor between all transpilers?

High to high translation. Limited lowering.

> Who decides on this layering of which languages are higher level or lower level?

You know it when you see it.

Who decides what makes a book a 'horror book'? There's no authority on that either. You know it when you see it.

> C2Rust doesn't call itself a transpiler, it calls itself a translator.

Yes a translator - a translating compiler - a transpiler.

> This term seems completely useless to me.

Not sure why the term seems to wind people up so much - it just add a little extra info.




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

Search: