On Mar 27, 2007, at 8:24 PM, William D Clinger wrote:
Andre van Tonder correctly observed that the change to letrec* semantics for internal definitions will make optimization more difficult. With the letrec* semantics, Scheme programmers would just have to learn that internal definitions are assignments in disguise,
Weren't the semantics of internal definitions equivalent to the semantics of letrec in R5RS? If so, then Scheme programmers should've already learned that internal definitions are assignments in disguise, no? I think Andre's comment would've been applicable even if the semantics of internal defines were to remain equivalent to letrec. So, whether internal defines are letrec or letrec* is orthogonal to the issue at hand. While I personally prefer letrec over letrec* semantics for internal definitions, for the majority of the code that I write, I see no big difference in the efficiency of the code I generate. The reason may well be that for the code that I write, I try to follow the rules you listed (whenever possible) unless I know the compiler handles some additional cases like (if 1 2 3) :-) Yes, performance may degrade at times when a compiler is presented with code outside of its capacity to optimize. This is true of any compiler. To maximize performance, you bring the code and compiler closer by making the code simpler or by making the compiler more sophisticated. Do you see another way around it? Aziz,,, _______________________________________________ r6rs-discuss mailing list [email protected] http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss
