On Sun, Feb 19, 2012 at 09:10:57PM -0500, Eli Barzilay wrote: [...] > Speaking about such transformations and about things like (if E #t #f), > I have some code which I run against student submissions to find style > problems like these, and using syntax transformations means that it's > easy to make it actually suggest the transformation. For example, > feeding it this code: [...] > Actually, there's a few more things it prints -- it's not intended to > be used without a human going over its output. In case someone is > interested in such a project I can send out the code. It could even > make a cute drracket tool that criticizes your code... > > -- > ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: > http://barzilay.org/ Maze is Life!
I suspect lots of us do some amount of this: I'd definitely be interested in having yours. For the next assignment my students are going to flesh out a small tool with what 'syntax-rules' can match, and perhaps they'll get a little form that receives the datum so they can catch more by working on the s-expression as value the way they did with Π-exprs. Oh, that's 'define-macro' isn't it ---just had a blind spot due to avoiding 'define-macro' for pretty much any other use except to talk about the concept of macros. ____________________ Racket Users list: http://lists.racket-lang.org/users