Opened 14 years ago

Closed 14 years ago

#288 closed task (fixed)

remove "outer" bindings for non-standard procedures in library procedure definitions

Reported by: felix winkelmann Owned by:
Priority: not urgent at all Milestone:
Component: core libraries Version: 4.5.x
Keywords: Cc: Kon Lovett
Estimated difficulty:

Description

The idiom

(define FOO 
  (let ((P1 P1) ...)
    (lambda ...

is used in many places in the core libraries, but R5RS merely requires standard procedures to be safe-for-redefinition. To reduce the closure size of built-in procedures, those bindings can be omitted if referring to non-R5RS procedures.

Change History (3)

comment:1 Changed 14 years ago by Kon Lovett

Cc: Kon Lovett added

Yes, but I think the "spirit" is not being followed. Maybe have restricted namespace bindings for the original binding. Something disjoint from 'sys' since it tends to imply a more restricted set f behaviors. Maybe 'lib' or '1st'.

comment:2 in reply to:  1 Changed 14 years ago by felix winkelmann

Replying to kon:

Yes, but I think the "spirit" is not being followed. Maybe have restricted namespace bindings for the original binding. Something disjoint from 'sys' since it tends to imply a more restricted set f behaviors. Maybe 'lib' or '1st'.

You mean introducing internal bindings for the standard procedures? I don't know - there already are too many symbols defined in the initial heap.

To get any acceptable performance, a Scheme compiler must make assumptions about the contents of standard toplevel variables (unless one uses speculative inlining extensively, which has different costs). Common Lisp, for example, punts on this and simply disallowes changing the exported bindings of the CL package. If a user wants to change standard procedures, the module system provides the necessary means.

comment:3 Changed 14 years ago by felix winkelmann

Resolution: fixed
Status: newclosed

Done in experimental branch.

Note: See TracTickets for help on using tickets.