If a human can rewrite code from one language to do the same thing in another language, it's definitely possible to automate. But I acknowledge that translation will be very difficult to achieve. Saying something is impossible because it's very hard is ultimately self-limiting.
-
-
"Just rewrite the code," when the code you want rewritten was homebrewed by 20,000 different labs without the time or necessarily the expertise to rewrite it, is actually a much harder problem to solve than trying to solve the automation problem outright.
-
Is there a constrained version of this problem for which it would seem more feasible to you?
-
Rewriting the code is probably for the best even if you could translate it. It would force you to adopt more modern standards, tighten the spec, write good docs and comments.
-
From a sociological standpoint, that suggestion is as idealistic and borderline impossible as my original suggestion =)
-
It's been done often. In fact reimplementing code is pretty much the only way (I know of) to keep it alive. I have done it myself. Pretty much all CS undergrads do it.
-
It's so a thing it has a Wikipedia page! https://en.wikipedia.org/wiki/Rewrite_(programming) …
End of conversation
New conversation -
-
-
There's so much to unpack here but it's essentially boiling down to it doesn't make sense to do this.
-
MATLAB, with it's closed ecosystem is probably a better potential target than, say, PHP. It wouldn't be easy, it wouldn't be cheap, but it's certainly not insurmountable.
-
Years ago I wrote a PHP to python translator, which did the syntax translation but it was the mapping of the standard library that killed it.
-
I really don't think it's a good idea to market a MATLAB to Python translator to scientists. They/we already write really bad code... the last thing we need is code they/we can't even read!
- 1 more reply
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.