Fork me on GitHub
#core-typed
<
2020-02-15
>
ambrosebs02:02:05

@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

ambrosebs02:02:54

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.

ambrosebs02:02:31

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

ambrosebs02:02:39

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

ambrosebs02:02:13

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

ambrosebs02:02:55

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

whilo21:02:15

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.

whilo23:02:50

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