ok probably silly question. so programming languages are different, but why aren't there more cross-language code generation tools? or why don't I see them used? like it seems like there is always information loss, but converting from a strongly typed language to something like python would lose less than vice versa. seems like you could at least get close?? !/
@jonny In certain contexts where it's useful it isn't actually that uncommon. Lots of web programming languages like TypeScript, CoffeeScript and Elm all get transpiled to JavaScript. I don't know of any reason to go in the other direction, though, similar to compiling something like C to Assembly
@cstanhope @njms so thats what defines the utility of compilation/transpilation, and converges with the notion of using "native" in mobile web world -- the basin point isn't uniform, but is just the "platform default." hmm. So then the goals are very different if you just want a package for polyglots, for the sake of broader use and understanding rather than performance or reliability. you as usual thinking in the same vein about the social use of code <3
@psf @cstanhope IIRC this is *kind of* what CoffeeScript attempts to do, or at least, here's their comparison and I'll let you judge:
https://coffeescript.org/#overview
Which is comically more readable than the compressed blocks of anonymous functions I've seen get spat out by other transpilers. But I agree with @jonny in that transpiling from CoffeeScript doesn't feel the same as what they were getting at. An idiomatic transpiler would be pretty cool and I'm surprised they don't seem more common