News for hackers. Stuff that matters.
Re:Why is BIND 10 written in C++ and Python? by misnome on Wednesday February 27, 2013 @07:06AM (#5291916)
Why doesn't it look good for python? As far as I'm aware, Python has never been advertised as a top-performance language, and part of the advantage has always been that you can rewrite performance-critical paths in c.

Adding to this, the fact that BIND is something pretty performance-intensive, I don't think this makes it look bad at all.

Re:Why is BIND 10 written in C++ and Python? by stefantalpalaru on Wednesday February 27, 2013 @07:39AM (#5292025)
Because the stated goal was to use Python "whenever possible" and judging by the python2 bashing at the end of the article, the author is a true believer yet the best he could do was 17% of the total code.

This also clashes with the belief in the Python community that performance is not an issue because you just rewrite those few critical sections in C/C++. How's 75% as one possible definition of "few"?

Re:Why is BIND 10 written in C++ and Python? by buster on Wednesday February 27, 2013 @08:09AM (#5292121)
What stupid comparison is this? Of course there will be more lines of code in C++, but i bet you that 10 lines of python do more then 10 lines of C++.

As another comment puts it: How much more C++ would there be without python?

Re:Why is BIND 10 written in C++ and Python? by coldtea on Wednesday February 27, 2013 @08:17AM (#5292147)
>Because the stated goal was to use Python "whenever possible" and judging by the python2 bashing at the end of the article, the author is a true believer yet the best he could do was 17% of the total code.

Of the total code of a very specific application, with very specific performance needs.

For others applications, including servers, the ratio could vary widely.

Re:Why is BIND 10 written in C++ and Python? by lmm on Wednesday February 27, 2013 @10:00AM (#5292641)
If they're comparing by lines of code, the 17% that's in python may well contain most of the logic.
Re:Why is BIND 10 written in C++ and Python? by eksith on Wednesday February 27, 2013 @08:49AM (#5292308)
Bashing might be a bit harsh. Looks like the author is expressing legitimate concern about the proliferation of Python 2 over 3 and, let's face it, there are a lot of differences while 3 "is the future" as it says.

The percentages may or may not be simply a case of C++ verbosity, but without actually browsing the source, we shouldn't jump the gun on exactly what percentage of "heavy lifting" C++ is doing vs. Python.

Re:Why is BIND 10 written in C++ and Python? by papsosouid on Wednesday February 27, 2013 @10:18AM (#5292729)
>Why doesn't it look good for python?

Because it directly contradicts the "only 20% of your code is performance sensitive and the other 80% can be scripting language X" nonsense that scripting language apologists constantly parrot with no evidence. This is a good example of how scripting languages are in fact not well suited to application development, and should instead be used for scripting.

Re:Why is BIND 10 written in C++ and Python? by DannoHung on Wednesday February 27, 2013 @02:16PM (#5294224)
The question isn't how much Python there is relative to C++, the question is how much C++ there would be if there were no Python.

To put it more concisely: "only 20% of your logic is performance sensitive and the other 80% can be encoded in scripting language X leading to a significant reduction of your total code."

Re:Why is BIND 10 written in C++ and Python? by papsosouid on Wednesday February 27, 2013 @03:48PM (#5294796)
It doesn't lead to a significant reduction though, it is hardly any reduction at all. Look at their code, the python could be replaced with C++ at an almost 1:1 ratio.
Re:Why is BIND 10 written in C++ and Python? by halostatue on Wednesday February 27, 2013 @01:01PM (#5293783)
I would argue that BIND isn't "merely" an application: it's almost kernel-level in what it needs to do and how it needs to respond. At a minimum, it's system-level—but definitely not application-level.
Re:Why is BIND 10 written in C++ and Python? by papsosouid on Wednesday February 27, 2013 @01:20PM (#5293894)
There is nothing almost kernel-level about it. It is an application. You seem to be trying to draw a very arbitrary distinction between applications and applications that you want to consider special for no particular reason.
Re:Why is BIND 10 written in C++ and Python? by fijal on Wednesday February 27, 2013 @10:42AM (#5292887)
Or you should use a fast Python interpreter instead of the slow one. The 20/80 (or 10/90 or so) is mostly nonsense in my experience too.