Dependent Type Systems as Macros [pdf]
williamjbowman.com
Dependent Type Systems as Macros [pdf]
1–8 of 8 posts
Re: Dependent Type Systems as Macros [pdf]
#2Re: Dependent Type Systems as Macros [pdf]
#3Re: Dependent Type Systems as Macros [pdf]
#4So a type system using macros, I assume this would enforce types at compile time and not runtime? I don't really see the value of type checking at runtime; I won't catch type errors until after the system is deployed! Would like to hear others opinions because people are really excited about clojure.spec. I just feel like it adds additional overhead for... slightly improved error messages? I could see the value in a…
Since most people write some level of unit-testing for Clojure anyway, adding spec type-signature functions gives you something like a compile-time typecheck that is relatively easy to add to your CI or simply by invoking `lein test`. In combination with generative testing, being able to have a CFG system to use for your types ends up being a lot more powerful than Hindley-Milner, closer to a dependently-typed system.
Also, while I'm reasonably certain that spec doesn't do this, it's not unreasonable to think that a runtime type system could be used for optimizations that can't be fully known during compile-time.
Re: Dependent Type Systems as Macros [pdf]
#5So a type system using macros, I assume this would enforce types at compile time and not runtime? I don't really see the value of type checking at runtime; I won't catch type errors until after the system is deployed! Would like to hear others opinions because people are really excited about clojure.spec. I just feel like it adds additional overhead for... slightly improved error messages? I could see the value in a…
However, lisps blur the distinction between run-time and compile-time somewhat because you usually connect your development environment to a running system while developing (it’s somewhat like using a debugger in other languages.) and I, at least, develop the initial version of a new function in the REPL before copying it into my source code, generalizing it and writing tests: so, for the most part, I will see the runtime type errors during development just as if I had been using a compiler/IDE to check the types.
Re: Dependent Type Systems as Macros [pdf]
#6Here is the official acm link to the paper: https://dl.acm.org/doi/10.1145/3371071
Re: Dependent Type Systems as Macros [pdf]
#7It's nice to see the work from Type Systems as Macros (also Stephen Chang of NU) continued! Thanks for sharing. http://www.ccs.neu.edu/home/stchang/pubs/ckg-popl2017.pdf
Re: Dependent Type Systems as Macros [pdf]
#8So a type system using macros, I assume this would enforce types at compile time and not runtime? I don't really see the value of type checking at runtime; I won't catch type errors until after the system is deployed! Would like to hear others opinions because people are really excited about clojure.spec. I just feel like it adds additional overhead for... slightly improved error messages? I could see the value in a…