I’m trying to use Roc. I crashed the compiler so many times though, I might switch to something else. I was also thinking of trying BQN or a forth.
Interested in how this goes for you! Was very tempted to do Roc this year but decided to give it one more year to bake. So now I’m doing it in boring old Go instead, and getting nerd-sniped by trying to make a real build/test/execution framework for it instead of by the language itself :)
We’d love to get bug reports of the compiler crashes you run into! It’s been a big goal to wind those down recently.
If there was some command or opt-in flag to automatically send crash reports I’d happily do that. But the crashes are so frequent I don’t really have the energy to prepare a report and search existing issues for every one. I’d end up spending all my time doing that instead of solving the puzzles.
Set-theoretic types are exciting for languages with dynamically-typed runtimes. Cduce and Ballerina are the two languages I know of that have really embraced them. Castagna is definitely a huge influence to set-theoretic types. Covariance and Controvariance: a fresh look at an old issue by Castagna is a great introduction to set-theoretic types (sections 4 and 5 hold the core of the set-theoretic foundations)
Whiley is a really interesting project. David, I really like your paper “Sound and Complete Flow Typing with Unions, Intersections and Negations”. I’ve found much use for its ideas several times in the past year. Thank you.
Wow, I wish I had known about this paper a year and a half ago, when I was trying to re-invent this, for an early prototype of Dawn. Looking forward to studying and implementing a prototype concatenative language using this.
Hey, thanks!! Great to hear someone actually read it :)
Hey, question for you: Have you thought about how flow typing could be combined with compilation to machine/object code? You could of course assign a unique type id to each type, but that would have to be done at link time, presumably, and then it’s not clear how dynamic linking could work. Any thoughts on this problem?
Hey, so your question seems connected with low-level representation of flow typing. Yes, I have thought about this. Probably my preferred solution is actually to use type tags. So, a type like null|int has a one bit tag to distinguish null from int. However, this then raises separate questions, as to how map arbitrary combinations of unions and intersections (as in the paper) down to this. Happy to talk more about it!
Okay, interesting. I had considered that, initially, but then thought all the conversions between encodings would be too expensive. But maybe the compiler could choose encodings so as to minimize conversions, at least within a procedure?
Hey, so yeah … this is a key question. I have thought about it a bit, though not made any specific decisions. You are right that you’d want to minimise conversions. I also agree that some conventions could be used to minimise the coercions, or at least make them efficient. Anyways, yeah, needs thought :)