4 ms·
Theoretically this seems possible with Haxe (http://haxe.org/manual/introduction-what-is-haxe.html http://haxe.org/manual/introduction-what-is-haxe.html). It se
by hardwaresofton 10y ago
Theoretically this seems possible with Haxe (http://haxe.org/manual/introduction-what-is-haxe.html http://haxe.org/manual/introduction-what-is-haxe.html). It seems possible to write something that went from Python -> Haxe -> Java?
Right now all I know for sure is that Haxe offers Haxe -> Python in sourcecode (though an AST would be better, probably), and Haxe offers Haxe -> C++...
Generally, it might make more sense to go from AST to AST then back to source code or something, if you didn't need to see the source code after.
I personally appreciate that different languages have different syntax. In some languages it doesn't matter (because they're so close anyway), but across large gulfs there are non-negligible differences in productivity, IMO. If I need to write lots of regexes and do some small scripting or write something no one will understand later, perl's syntax might shine there, it would be bad (I think) to get into the habit of writing in one syntax or with one syntax when there are better syntaxes that might cut down on writing time for the job... Of course, there is the benefit of cutting down unnecessary writing by using perl INSTEAD of something like Java by using this idea...
- hardwaresofton 10y ago*AST -> AST -> vm/interpreter bytecode/machine code