Temper Language
16 points by veqq
16 points by veqq
Haxe is another language which has been around for awhile with similar goals (and similar compilation targets!)
Sounds like dafny but with less
Temper enables you to a write single library implementation of e.g. a data protocol which you can transpile into JS, Lua, Java etc. without having to reimplement it.
I wonder what the seams are when the target language doesn't match up.
I imagine this works best when you just want to express basic Algol-shaped logic. If you're implementing a protocol, you'd have to be careful to decompose your library into synchronous functions, because stuff like threading might not exist in your target language, or the closest functionality might be a completely different paradigm (such as async JS).
I'm surprised to see Rust in their target languages documentation! I wonder how that would even work. Are all types value types so it can fall back to cloning everywhere?
My initial reaction was, "This project is like Haxe, except it's simpler because they don't have to write a runtime environment for each platform." But now I'm thinking this problem is even more complex.
But now I'm thinking this problem is even more complex.
My experience with these setups is that things are fine if you have an algorithm that you need across multiple platforms, but trying to ship an application across them runs squarely into the "WASI" problem: you have to either roll your own everything or figure out how to RPC out into the native platform
KotlinJS is another less extreme example of that problem: https://kotlinlang.org/docs/js-interop.html#external-modifier
only 10,000-ish lines of Kotlin to find out :-D
and they also ship some rust shim code, too