Fork me on GitHub

@whilo turnstile's been a big inspiration for where it's heading. the main difference is that turnstile actually integrates into racket's macroexpander, core.typed will manage it's own macroexpansion. plus, a turntile typing rule is a macro+typing rule rolled into one, a core.typed rule is a typing rule, and the macro is a separate entity


I mean, turnstile is way more sophisticated because it stands on the shoulders of racket's hygienic expander. in comparison I'm doing pretty straightforward things.


the important thing I learnt from turnstile is the main difference between a macro and a typing rule is the latter has an expected type argument


I took that insight and ran with it. clojure's evaluation model is way different from Racket's (more like CL) so there's unique challenges compared to racket. clojure doesn't have phases for example, or at least they're interleaved instead of sequential


the biggest challenge in porting turnstile's ideas to clojure has been the fact that macroexpansion and evaluation is interleaved in clojure


so that means that a typing rule also has to manage evaluation. that simply isn't a concern in turnstile afaik


yes, it seems to me that the macroexpansion in clojure is not made to have extensible meta-programming in a similar way that racket has. racket makes a very strong distinction between compile-time and runtime though, which might also not be really ideal, but should be fine for core.typed functionality.


having seen a lot of papers about racket macroexpansion lately, i am curious whether we could replace or wrap the clojure macroexpansion somehow with something that allows to port more of rackets functionality onto clojure