logoalt Hacker News

Lisp in the Rust Type System

107 pointsby quasigloamlast Saturday at 5:43 AM16 commentsview on HN

Comments

wuscheltoday at 3:30 PM

That is incredible, but I must ask: Beside really getting to know Rust's trait and type system, and besides experimental / educational tinkering, could this have any practical use case?

saghmtoday at 3:07 PM

I was surprised but pleased to see this was a declarative macro rather than a proc macro. While proc macros are more powerful, there's a surprising amount of expressive power in the declarative ones, and I'm fond of playing around with them to figure out how to stretch them beyond where it seems like they should be able to get (and maybe shouldn't be used for in real code, but that doesn't make it less fun for playing around!)

ElenaDaibunnytoday at 10:00 AM

call/ec at the type level is the surprising part here, most compile-time Lisp implementations stop at basic eval but escape continuations need real control flow reasoning through trait resolution

show 1 reply
bigfishrunningtoday at 12:36 PM

This is impressive! I'm supposed to do work today, but now I just want to play with this thing

CupricTeatoday at 1:57 PM

I'm honestly a bit shocked this was done entirely using declarative macros. Normally when I see such arbitrary syntax I assume it's implemented as a proc macro.

tennisgooatoday at 8:36 AM

[dead]