Quote:
By the way, delegates (bound object methods passed as functions) were present in Object Pascal and so semantically closures were even there (it was clumsy for some uses, because it was apparently optimized for a fixed use case) |
Quote:
Half way: http://en.wikipedia.org/wiki/Closure...ence%29#Python . Rather, used to be half-way until Python 3.1 - I have already written in a different forum that after more than 10 years Python finally catches up with Perl. On my Suse-11.1 Python version is 2.6. |
I can't write that in bash, bash arrays are no good, maybe in python or C. But, I don't think I would even need such a program as you wrote.
|
Quote:
|
Well, but WRT anonymity Python is still behind Perl:
http://en.wikipedia.org/wiki/Anonymous_function#Python : Quote:
|
Quote:
What I wrote is a rudimentary object - a set of encapsulated and possibly related data and functions. |
I wanted to say something here:
When reading about Haskell, I found that it said all variables were unchangable once they were created, and I understood that this was part of all functional languages. Is this true? |
Quote:
Immutability allows much better optimizations and formal correctness proofs. OCaml, for example, allows to explicitly declare a variable or a field mutable, but recommends to do this as seldom as possible and when really needed. The tutorial has examples/explanations on this. |
All times are GMT -5. The time now is 01:38 AM. |