Are there programming languages ​​that directly translate to another?

Is there a programming language that does not compile, but rather translates into another language? I apologize if this is a stupid question, but I just wondered if this would be a literal shortcut when creating a programming language. Wouldn't that be easier (maybe not fast), but still doable?

+4
source share
4 answers

Is there a programming language that does not compile, but rather translates into another language?

It makes no sense to me. My definition of compilation is "translation from one language (source language) to another (target language)."

- - , - ( asm), . , ( ).

, . , C: C-, C, , C, ( ), C JavaScript, C, Perl ..

: , .

- ( ) back-end ( ). , , . , .

. , C-, C. ++ . C ; , (., , C--, GHC ( Haskell)).

+3

JavaScript. ECMAScript . Babel.

, TypeScript CoffeScript, JavaScript.

0

f2c Fortran 77 C. , , , , .

0

Turing complete. , .

, , . , , .

When their design becomes stable, they make an existing compiler in front of them for compilation. Using an existing compiler has several advantages. Optimization is instantly available. The new language may have access to existing libraries. Compilation can target all existing back ends, making the language accessible to different architectures.

0
source

Source: https://habr.com/ru/post/1695127/


All Articles