chicken-janitors
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-janitors] #221: defstruct could use compiler-syntax to speed up


From: Chicken Trac
Subject: [Chicken-janitors] #221: defstruct could use compiler-syntax to speed up instance creation
Date: Thu, 29 Apr 2010 13:17:02 -0000

#221: defstruct could use compiler-syntax to speed up instance creation
-------------------------------------------+--------------------------------
 Reporter:  felix                          |       Owner:  felix
     Type:  enhancement                    |      Status:  new  
 Priority:  not urgent at all              |   Milestone:       
Component:  core libraries                 |     Version:       
 Keywords:  keywords eval compiler-syntax  |  
-------------------------------------------+--------------------------------
 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`.

-- 
Ticket URL: <http://www.irp.oist.jp/trac/chicken/ticket/221>
Chicken Scheme <http://www.call-with-current-continuation.org/>
Chicken Scheme is a compiler for the Scheme programming language.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]