Re:What Template Haskell gets wrong and Racket gets right
by samth on Monday July 18, 2016 @04:16PM
(#12117799)
Yes, you can certainly do that in Racket. For example, the `case` macro does exactly that when there are many possibilities. Unless you mean something different that I mean by "create and then read from".
Re:What Template Haskell gets wrong and Racket gets right
by madmax96 on Monday July 18, 2016 @04:24PM
(#12117845)
Ah. It seems I have misunderstood some of the Racket documentation. Thanks for the comment -- helped me out:)
Also adding that what I was doing in Guile, Common Lisp, and Clojure was sloppy. After searching for the case macro, saying 'aha!', and applying what I learned into creating an equivalent Racket macro, I realize that it was a portable solution to Guile, and the same idea applies for non-hygienic macro systems.
Re:What Template Haskell gets wrong and Racket gets right
by gus_massa on Monday July 18, 2016 @06:21PM
(#12118370)
If you send a minimized example to the mailing list, I'm sure someone will translate it from Guile to Racket in a few hours. https://groups.google.com/forum/#!forum/racket-users
(If the example is not too long, perhaps you can paste it here.)
Does Racket have a way to address the need to, say, create a dispatching table during syntax expansion and read from that table at runtime? I don't know Racket well, but I've been able to do similar things easily in Guile, Common Lisp, and Clojure without an issue. Googling this problem leads me to believe that it can't be done, which is a pretty severe handicap to have if you're a Lisp.