better lambda support in the future?
dima at trit.invalid
Sat Dec 18 10:43:38 CET 2004
On 2004-12-18, Terry Reedy <tjreedy at udel.edu> wrote:
> "Dima Dorfman" <dima at trit.invalid> wrote in message
> news:slrncs76sg.1rvi.dima at beaver.trit.org...
>> Both languages compile all three functions (f and the two versions of
>> g) once and choose which g to return at run-time.
> *If* OCaml or any other 'other' language compiles the two versions of g to
> the final and complete functions that get returned (but I don't know if
> that is so for OCaml or and other appropriate 'other'), then it does
> something different from and less flexible than Python.
Sorry, I glossed over the details to convey the general idea. In
OCaml, as in Python, the code is compiled once but the closure is made
# f 3 == f 3;;
- : bool = false
where "==" is the physical equality operator like Python's "is".
More information about the Python-list