Hello, all. This is my first post on the list, I'm a CS student and I've been giving Scheme a shot. (liking it a lot, so far).<br><br>Now, given the following code:<br><br>(define-syntax myhash<br> (syntax-rules (->)<br>
[(_ (x -> y) ...)<br> #hash((x . y) ...)]))<br><br>When trying to compile it, I get:<br><br>. read: expected `(' or `[' or `{' to start a hash pair<br clear="all"><br>I was told that this happens because the compiler recognizes #hash as a hash-table long before (in the lexical analysis?) knowing that it is inside a (define-syntax), and therefore doesn't get the semantics of '...' - it just interprets it as illegal syntax.<br>
<br>This seems like a major wart with the language. What are your opinions?<br><br>-- <br>Patrick Steiger.<br><br>"Theory is when you know something, but it doesn't work. Practice is<br>when something works, but you don't know why.<br>
Programmers combine theory and practice: Nothing works and they don't<br>know why." - Anon <br>