Closed Bug 541612 Opened 15 years ago Closed 15 years ago

bound functions

Categories

(Servo Graveyard :: Rust, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: graydon, Assigned: dherman)

References

Details

Function closing/currying support. Dherman has this mapped out somewhat in his head and underway. Basic idea is that all 1st class function values become [fn,binding] pairs, and trans gets modified to call them with 'binding' as trailing extra-arg. Works transparently for a non-bound 1st class function, as it isn't going to look at the binding extra-arg, so it can be a junk pointer or null, doesn't matter. Binding a function synthesizes a thunk (needs a new Semant.GLUE_binding constructor) that unpacks the bound args, rearranges them and the incoming args, and calls through to the target.
Blocks: 544925
At this point I think this bug can be said to be fixed. There are bugs and missing parts in the implementation, but that's true of just about everything at present.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Group: servo
You need to log in before you can comment on or make changes to this bug.