|
From: | Markus Schiltknecht |
Subject: | Re: [Monotone-devel] Re: HOWTO: benchmarking monotone (was Re: "memory exhausted" error for 'mtn list status' command) |
Date: | Thu, 12 Oct 2006 10:57:07 +0200 |
User-agent: | Thunderbird 1.5.0.7 (X11/20060927) |
Hi,I'm missing the beginning of the thread. What benchmark harness are we talking about?
Nathaniel Smith wrote:
"requirements" are part of the benchmark harness, nothing to do with python -- before the harness runs some benchmark, it looks at the benchmark object to see if it has any "requirements" (other runnable objects), and if it does, it runs those first. That's all :-)."this" as to be declared as a first parameter (linke in a language born when OOP meanth nothing 0_o???), but thanks to this clear "tutorial" IPeople say all sorts of crazy things about the initial "self" argument on python methods, and it does take a bit to get used to typing it at the right times, but the idea is that there are no "invisible variables" -- 'this' in C++ for example basically _is_ a function argument, it's passed in from outside and it has function scope, but, it's magic and implicit. In python, all the local variables come from the function arguments.
I can confirm it's mainly a matter of getting used to it. I've been coding mostly in python, now switched to C++ for monotone. And I've been wondering where such a variable came from. It took me a while to get used to having all object variables implicitly declared. And I caught myself thinking "hey, isn't this dangerous and unclear?" - well, you have to remember your object variables (which you often do anyway) and gain typing five keys ;-)
I got used to it and enjoy switching between python and C++ for different projects now. Although, I've learned a lot about C++ lately and really appreciate it's template system. STL and boost seem to be very well abstracted.
Regards Markus
[Prev in Thread] | Current Thread | [Next in Thread] |