I wonder how hard it would be to make a dynamically typed, interpreted, garbage-collected language with Rust syntax and then give it full interop with Rust
Conversation
Like, my dream is a gradually typed language where typed code gets efficient binary packing. For awhile I've been imagining one gets this by taking something like TypeScript and compiling classes into structs.
4
11
yeah i was chatting with someone who was working on optional type annotations for some normally untyped lang (python?), and they were like "right now adding types makes everything slower because it creates tons of dynamic assertions at the boundary"
1
2
(based on gradual type researchy folk in my feed this is basically the #1 research focus in their field (or at worst #2 if I'm forgetting something) so yeah. apparently it's fundamentally hard)
3
3
Yup, that seems to be the experience from Typed Racket. I think they're making progress though. Or you can just throw soundness out the window and not check the boundary… which is what Flow and TS do. Can cause user frustration esp. if library devs aren't good at annotating.
1
Here is a talk from ICFP last year talking about the challenges:




