4 ms·
Some answers: - The type system I'm thinking of includes effect inference from Koka (http://www.rise4fun.com/koka/tutorial http://www.rise4fun.com/koka/tutoria
by trishume 10y ago
Some answers:
- The type system I'm thinking of includes effect inference from Koka (http://www.rise4fun.com/koka/tutorial http://www.rise4fun.com/koka/tutorial), is simpler in other places, and has full type inference even of function signatures.
- An example of type info to link is effects. I could do things like serializing my type structures into Rust method names and then decoding them, but that's pretty hacky.
- Error reporting isn't just mapping, it's the messages too. I don't want my language getting error messages like "modification of an immutable borrow" or "cannot pass an Rc<RefCell<MyLangInt>> to a function that takes an Rc<RefCell<Vec<MyLangInt>>" when it doesn't look like that or have those constructs.
- RefCell has runtime overhead where every other compiled language doesn't.
- I think the type systems of most statically typed languages are substantially different from Rust that it would be an impedance mismatch.
I think this is only remotely better for dynamically typed languages, since that also solves a lot of the issues with errors since those are mostly created by your runtime functions.