On 14 Oct 2009, at 7:30 pm, Ray Dillinger wrote: > All we need to add is > > (define-constant <name> <expression>) > > With the same semantics as define except that later mutation of > the value is an error. If a generalized function is declared > constant, then an expression using it can be reduced via > inlining and partial-evaluation in exactly the same way as > applying a macro. > > Is that the sort of thing you were looking for?
It's an example of the sort of thing. It's pretty much what I designed as my final-year project in my undergraduate CS course, and have more recently started tinkering with again, in search of hygiene; except I just went for a purely functional language in the first place, rather than adding define-constant to an imperative one :-) But either way, I used inlining and partial evaluation to provide first-class macros, yes! :-) > > Bear > ABS -- Alaric Snell-Pym Work: http://www.snell-systems.co.uk/ Play: http://www.snell-pym.org.uk/alaric/ Blog: http://www.snell-pym.org.uk/archives/author/alaric/ _______________________________________________ r6rs-discuss mailing list [email protected] http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss
