Differences between a transpilator and a compiler

Asked

Viewed 1,336 times

2

Lately there has been much talk of the term transpilator (transpiler). However, it does not seem clear to me the difference between transpiler (Babel, for example) for a compiler (Compiler) traditional. The two translate code from one language to another, not?

What are the real differences between a compiler and a transpilator?

  • 4

    Wow, it’s duplicate, and people go around answering, not researching :\

  • Search there and put it for us to see... @Wallacemaxters

  • 2

    The other duplicate: What is Transpilation?

  • Ready now, mark as duplicate...@Wallacemaxters

  • 3

    Something that I pick up and the staff does not understand, it is not only the AP who should give a brief search to see if it is not dup, who will respond can very well do this, after all we are a community, it costs nothing to be a little selfless and collaborate pointing out existing answers, I’ve gotten a reputation for boring so much that I talk about it, but people are flustered to respond. A real shame.

  • 1

    @Guilhermenascimento I think it’s unnecessary, to put it in the way that "Valace" put it, as if answering a duplicate were negative... I mean, the good will of the respondent is not being taken into account.Indeed any kind of comment, since the system offers us the tool to mark as duplicate. And tell me something, where you’re saying that before you answer the AR you have to search to see if there are no duplicates (I’m not saying it’s good practice, just that answering is not bad practice in my view)?

  • @Magichat is quiet :) . I’m not saying it’s a rule, I’m talking about collaborating better with the community, nothing is perfect, but it costs nothing to give a little help

  • @Guilhermenascimento It helps more than trying to answer... When I see possible dup, or some direction pointing to an answer I consider, but until the answers come out in a had nothing... And then someone comes criticizing, putting in a way that is wrong answer, then I catch badly. But I’m tranquilex.... Now there is neither goal nor help center, something that talks about it?

  • @Magichat is not a matter of rule or debate, it is just a suggestion of how to make use of the tool, in the case button Fechar > Duplicada de .... But it’s something that I’ve kind of given up on, there are really bigger problems on the site, but they won’t actually be solved either :/

  • @Guilhermenascimento is part, I need to take the habit of giving a researched before, unconsciously depart from the assumption that when typing the question the system already offers something to the AP, so if it arrives in the list of recent would be pq no dup, but we know that’s not how the funf...

Show 5 more comments

2 answers

6


Clearly and objectively:

  • Compiler: receives source code in high/medium level language (closest to humans) as input and, as output, produces code in low level language (closest to the machine). Ex.: C -> object code, Java -> JVM bytecode.

  • Transpilator: receives high/medium level language source code as input and, as output, produces code in another high/medium level language. Ex.: Typescript -> Javascript.

0

Roughly the transpiler is a type of compiler that translates a code written in a medium/high level language to a code from another medium/high level language.

The compiler translates from medium/high-level language to a lower-level language, an assembly language, for example.

Source

Browser other questions tagged

You are not signed in. Login or sign up in order to post.