On 8/11/05, Zbigniew <[EMAIL PROTECTED]> wrote: > > - Startup time of either simple-macros or syntax-case is very long -- > 1.7s as opposed to 0.1s without it, and this is on a 1.5GHz machine.
It's not much slower than loading the psyntax macros, though. > So I am somewhat reluctant to use this very useful and fundamental > concept except for big, non-time-critical apps. Is there room for > much optimization, or is it near the limit? I can't say, really. There should be room for improvement, but first we have to get it running properly. > - Does it make sense to release official eggs using one or the other > module system (assuming we pass the experimental phase)? The time and > the memory penalty give me pause---same reason I don't use TinyCLOS in > official stuff, seems silly to drag that much code in. Yes, that's something to keep in mind. It really depends on what you want: for application code it makes probably more sense to use psyntax/simple-macros modules. A counterexample is (say) utf8: here we shadow standard procedures. > - Does it make sense, given the time and space penalty, to use a > module system at all for smaller projects? Obviously, we have gotten > by without one, but the advantages are tempting. In small projects I find module systems more a nuisance than a real help. For medium-sized and large systems it is crucial (the chicken compiler, for example, should have been done using psyntax modules). > - I can't get define-macro to work with simple-macros (after importing > chicken-macros), but I'm sure this is my fault. Here is a patch: diff -c /home/fwinkel/stuff/work/kffd/chicken-macros-module.scm\~ /home/fwinkel/stuff/work/kffd/chicken-macros-module.scm --- /home/fwinkel/stuff/work/kffd/chicken-macros-module.scm~ 2005-08-06 00:23:28.000000000 +0200 +++ /home/fwinkel/stuff/work/kffd/chicken-macros-module.scm 2005-08-11 08:07:12.145400736 +0200 @@ -21,7 +21,7 @@ (import chicken-internals) (define-syntax include - (lambda form + (lambda (form) (if (= 2 (length form)) (let ((count ##sys#read-line-counter) (filename (cadr form)) ) @@ -38,12 +38,12 @@ (syntax-error "invalid `include' form") ) ) ) (define-syntax define-macro - (lambda form + (lambda (form) (cond ((and (= (length form) 3) (identifier? (cadr form))) (quasisyntax (define-syntax ,(cadr form) - (lambda exp + (lambda (exp) (datum->syntax (car exp) (apply ,(caddr form) (syntax->datum (cdr exp)))))))) > > Don't get me wrong, it's highly interesting and I will experiment. I > am just wondering if the intent is to really USE it all over the > place, or if it will be relegated to occasional projects. I wouldn't use it all over the place. I'd use it for self-contained applications or large-scale library projects. cheers, felix _______________________________________________ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users