5
$\begingroup$

Say I have a full application written in Python. Is it feasible to convert the source code into C? If such a tool doesn't exist, why doesn't it? What are the constraints?

I ask this since I have been wondering why people use C for microcontrollers when they could write their code uber-fast in Python when prototyping and then convert the source.

$\endgroup$
  • $\begingroup$ See here for Python in particular. But it also gives hints as to the general problems that are associated with compiling a high-level dynamic language to something like C. $\endgroup$ – Guildenstern Sep 28 '14 at 11:17
  • 1
    $\begingroup$ programmers.stackexchange.com/questions/12475/… $\endgroup$ – d'alar'cop Sep 28 '14 at 11:17
  • 2
    $\begingroup$ It's a perfectly reasonable question but it's already been answered on Programmers SE. $\endgroup$ – David Richerby Sep 28 '14 at 11:19
  • $\begingroup$ I claim the Programmers SE link is not useful for this question. First of all the question there is much more general, asking about translation between any two Turing complete languages. Second the answers there are all either irrelevant (because they are answering the more general question) or wrong. $\endgroup$ – Wandering Logic Sep 28 '14 at 12:24
  • $\begingroup$ The top 3 answers to cs.stackexchange.com/q/29589/7459 are much more interesting (and correct (and even maybe relevant to you)) than the answers on the Programmers SE question. $\endgroup$ – Wandering Logic Sep 28 '14 at 12:30