On 6/8/05, Reed Sheridan <[EMAIL PROTECTED]> wrote: > On 6/7/05, felix winkelmann <[EMAIL PROTECTED]> wrote: > > > > Macros and procedures live in a different namespace in the > > low-level macro system. The example above is simply wrong, > > but admittedly the error message could be improved. > > I don't quite understand. I thought we only had one namespace in > Scheme, and I was expecting foo to be set to 1, which is in fact what > happens if you use the -hygienic flag. To make it more clear, what > would a better error message say? >
I probably misused the term namespace here: Macros and variables (or syntax and non-syntax) are completely distinct and there can exist a variable and a macro of the same name (at least as it is currently implemented in Chicken's low-level macro system - which isn't particularly exotic). psyntax (syntax-case) uses a stricter system. Moreover syntax exists at compile-time, but non-syntactic variables exist at runtime. For example, what should be the result of: (define foo (read)) (define-syntax bar foo) ; probably not legal, but this should show the conceptual difference. ? Better error handling would be to signal that a syntactic and a non-syntactic entity of the same name is used. > > %char->latin1 is not hidden like it should be, due to a typo in the > declarations, but I don't understand how that could cause this to > happen. > Compiler optimizations, overly eager declarations and (again) missing error checks. I have fixed this (and added several error-checks to srfi-14.scm). cheers, felix _______________________________________________ Chicken-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/chicken-users
