id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc,difficulty 221,defstruct could use compiler-syntax to speed up instance creation,felix winkelmann,felix winkelmann,"By defining a compiler-macro on the constructor, keyword arguments can be pre-parsed and the constructor call be replaced by a direct structure value construction. Since this is applicable to various procedures, a general library procedure might be handy: (unit `eval`) {{{ (parse-keyword-arguments ARGLIST KEYS+DEFAULTS K) -> FORM }}} where K is a procedure `TMPVARS -> BODY` that returns a body. `FORM` is then a `let*` form binding temporaries to keep the original evaluation order of the arguments. In case of an invalid keyword argument list (computed keyword, missing keyword argument, non-keyword in keyword position, etc.) `parse-keyword-arguments` returns `#f`. ",enhancement,closed,not urgent at all,,core libraries,,wontfix,keywords eval compiler-syntax,,