Earlier quoted context omitted.
>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.
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."
Why is BIND 10 written in C++ and Python?
121–130 of 136 posts
Re: Why is BIND 10 written in C++ and Python?
#122Re: Why is BIND 10 written in C++ and Python?
#123Re: Why is BIND 10 written in C++ and Python?
#124Earlier quoted context omitted.
C++ allows to you to - use safe arrays with bound checking if you feel like to - use automatic memory management - pass arguments by reference and being sure they point to valid data - use proper strings without caring if the null character is missing C++ is only dangerous thanks to the C compatibility legacy. Don't use C'isms and the application will be a lot safer than doing pure C coding.
C allows those things too, that's the point. Saying "I choose to code unsafely in C, and safely in C++, therefore C++ is safe and C is dangerous" is dishonest. And C++ has plenty of its own dangerous aspects, not just C compatibility.
All of them would go away if C++ wasn't made to be C compatible.
Re: Why is BIND 10 written in C++ and Python?
#125Earlier quoted context omitted.
C++ allows to you to - use safe arrays with bound checking if you feel like to - use automatic memory management - pass arguments by reference and being sure they point to valid data - use proper strings without caring if the null character is missing C++ is only dangerous thanks to the C compatibility legacy. Don't use C'isms and the application will be a lot safer than doing pure C coding.
I am not sure about the reference passing, but the rest you can do in pure C, too. You can bound-check your arrays at run-time, by wrapping them in a struct and only accessing them with functions. There's even a proper (although conservative) garbage collector for C, while C++ usually boils down to reference counting. Even in C you are not restricted to the standard library to handle strings. C doesn't have to mean n…
This is no longer a data type seen as a language type, but an Abstract Data Type as known in Computer Science.
You are no longer using arrays, but a data structure made by yourself.
> There's even a proper (although conservative) garbage collector for C, while C++ usually boils down to reference counting.
If you are referering to Boehm-Demers-Weiser GC, it also works in C++.
C++11 also has a GC API.
> Even in C you are not restricted to the standard library to handle strings. C doesn't have to mean null-terminated strings.
The moment you do this, you are the strange kind in town as all libraries expect C style strings as input. So it is conversion party any time you need to call those functions.
> (And in C++, too, string literals give you the old-time bad strings.)
Yeah, this is a consequence of C's compatibility that infected C++.
Re: Why is BIND 10 written in C++ and Python?
#126Earlier quoted context omitted.
What about missile radar systems? http://www.militaryaerospace.com/articles/2009/03/thales-cho...
Very cool, but not really related to core internet functionality. The truth is, Java is viewed as "not Unix friendly" by many people, whether deserved or not. I suspect the ISC folks fall squarely into this camp. My personal and thus purely anecdotal experience is near-universal hostility from network admins. Despite this, there is a fair amount of network management software written in Java. OpenNMS and Cisco Prime…
I convinced unless a big OS vendor forces changes for their default system programming language, nothing will change.
This is why I like Microsoft's decision to drop C on Windows.
What I would like is to have a proper systems programming language in the lines of Modula-3/Active Oberon/C#/D/Rust or similar, being used.
Time will tell when this happens, but it will require a few generations of developers for the mentality change to take place.
Re: Why is BIND 10 written in C++ and Python?
#127Earlier quoted context omitted.
Those implementations have quite weak garbage collection implementations (boehm conservative, but I'm not sure), which would just kill the performance. Hotspot JVM has a very sofisticated Incremental Generational garbage collector, which does have a _very_ good performance. I'm pretty sure they had their reasons for not using Java (I actually do have mine too), but, garbage collection is not one of those.
Indeed. I was arguing against the 'you need the JVM as a dependency'. But then Go is all the hype these days, and people also use Go for network applications, which also has a weak GC ;).
Re: Why is BIND 10 written in C++ and Python?
#128Earlier quoted context omitted.
You haven't used PHP much? Or MUMPS?
PHP is not a compiled language for systems programming. As for MUMPS I know it is something used only in US it seems.
To nitpick a bit, compiled or not is more a property of the implementation than of the language itself. Of course, some languages are more commonly compiled than others. But, don't Facebook have a PHP compiler?
Re: Why is BIND 10 written in C++ and Python?
#129Earlier quoted context omitted.
I am not sure about the reference passing, but the rest you can do in pure C, too. You can bound-check your arrays at run-time, by wrapping them in a struct and only accessing them with functions. There's even a proper (although conservative) garbage collector for C, while C++ usually boils down to reference counting. Even in C you are not restricted to the standard library to handle strings. C doesn't have to mean n…
> You can bound-check your arrays at run-time, by wrapping them in a struct and only accessing them with functions. This is no longer a data type seen as a language type, but an Abstract Data Type as known in Computer Science. You are no longer using arrays, but a data structure made by yourself. > There's even a proper (although conservative) garbage collector for C, while C++ usually boils down to reference countin…
Yes, it's no longer a built-in data type. But non-builtin-types are perfectly fine, too. By the way, how do you get bounds checking in C++? I guess you use the same technique, but C++'s overloading makes it syntactically easier to hide that you are not using a built-in?
Re: Why is BIND 10 written in C++ and Python?
#130Earlier quoted context omitted.
> You can bound-check your arrays at run-time, by wrapping them in a struct and only accessing them with functions. This is no longer a data type seen as a language type, but an Abstract Data Type as known in Computer Science. You are no longer using arrays, but a data structure made by yourself. > There's even a proper (although conservative) garbage collector for C, while C++ usually boils down to reference countin…
> This is no longer a data type seen as a language type, but an Abstract Data Type as known in Computer Science. Yes, it's no longer a built-in data type. But non-builtin-types are perfectly fine, too. By the way, how do you get bounds checking in C++? I guess you use the same technique, but C++'s overloading makes it syntactically easier to hide that you are not using a built-in?
Thankfully C++ is powerful enough that user types have the same rights as built-in ones.