4 ms·
Thanks! I'll look into let-rec, I've never heard of it before :) Everything in my language is an expression, so I guess you could say every literal in the lang
by s-p-n 8y ago
Thanks! I'll look into let-rec, I've never heard of it before :)
Everything in my language is an expression, so I guess you could say every literal in the language is first-class.
I was thinking for i/o, I could use promises. The promise would resolve to whatever type makes sense for that resource- defined either by a library or by the program.
Of course, that brings up "arbitrary operations at runtime". My target after transpiling is JavaScript, which has a wonderful JIT compiler already. I need to learn source mapping and stuff so I can make error-tracing work nicely, as it's simply not possible to catch any possible error at compile-time.