Thomas Chust scripsit: > The SRFI's syntax for record definitions is compatible with SRFI-9, > but several extensions including convenient default names of > procedures, single inheritance of record types and introspection > capabilities are available, too.
Very cool! I started to write this a long time ago, but never got around to writing the syntactic module. Bug report: A constructor defined to take explicit arguments does not work: instead of returning the instance, it returns a procedure that takes N arguments and ignores them, where N is the number of slots specified for the constructor; this procedure must then be invoked with M arguments, where M is the number of slots in the record. API suggestion: add redefine-record-type, which is the same as define-record-type except that instead of a gensym'd uid it uses the record name as the uid. That allows you to easily redefine a record defined by Chicken's native SRFI-9 implementation so that you can define child record types of it, while still allowing existing instances to work. Implementation suggestion: rather than storing the uid-to-rtd mapping in a global hash table, store it on the property list of the uid under the the key 'srfi-99. That allows you to reload the implementation without trashing existing mappings. -- My corporate data's a mess! John Cowan It's all semi-structured, no less. http://www.ccil.org/~cowan But I'll be carefree co...@ccil.org Using XSLT On an XML DBMS. _______________________________________________ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users