[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nmh-workers] C++
From: |
Michael Richardson |
Subject: |
Re: [Nmh-workers] C++ |
Date: |
Wed, 14 Feb 2018 12:15:17 -0500 |
Paul Vixie <address@hidden> wrote:
> as promised, i asked bert hubert how he uses C++ in PowerDNS without
damaging
> himself:
> On Mon, Feb 12, 2018 at 12:43:16PM -0800, Paul Vixie wrote:
>> you seem to have made peace with C++. i predict that you did this by
>> declaring some subset of its features that you'd be willing to use, and
>> forbidding all others. if so, can you tell me what the subset is, and
>> how if at all you enforce it in your code base?
> he wrote back as follows, and also gave permission to be quoted here:
> bert hubert wrote:
>> You guess right! I think this might make a good blog post in fact.
Various
>> Linux kernel developers have read PowerDNS source code and most commented
>> this was the first bit of C++ they truly understood and could appreciate.
>>
>> The GCC compiler people have also decided to use C++, which is also
>> something of a vote of confidence from some pretty discerning folks.
>>
>> So in short, my guidelines consist of first reading the four thin books
by
>> Scott Meyer: Effective C++, More Effective C++, Effective STL, Effective
>> Modern C++.
>>
>> Especially the first book covers a lot of the "you can do tons of things
in
>> C++, but please don't".
>>
>> Things to not use or do (unless you have very good reason):
Thanks for posting this, I shall save it.
My impression is that the Rust guys started with the same list :-)
I believe that Rust will replace C and will perhaps wind up in places like
Contiki. It may find itself being used as a system implementation language
(i.e. as the core for ruby, perl, python).
I believe that GO will replace C++, Java and Python in many "system admin" and
bigger systems like GNOME and the like. C# has already replaced on windows
for UI stuff, and GO might make inroads among developers that didn't like C#.
GO is clearly optimized by google for google-scale things.
I can't imagine implementing /bin/ls in GO. /bin/bash in GO? sure.
I'm yet sure I can imagine implementing /bin/ls in Rust.
I'm highly pissed at the universe that all of them
(GO,Rust,Python,Perl,Ruby,Java) each have their own package system.
It seems that much of this has been driven by the lack of a useful packaging
system on Windows. While the OSX vs BSD vs RedHat vs Debian* level of (system)
packaging is another annoyance, I can mostly live with that.
>> Things to actually do:
>>
>> * Trust the compiler writer, use C++ to do heavy lifting
+1
--
] Never tell me the odds! | ipv6 mesh networks [
] Michael Richardson, Sandelman Software Works | network architect [
] address@hidden http://www.sandelman.ca/ | ruby on rails [
signature.asc
Description: PGP signature