News for hackers. Stuff that matters.
Re:OpenBSD base now free of C++ by goalieca on Monday March 14, 2011 @01:06PM (#2323323)
What an interesting development. The year is 2011 and we are proudly announcing removal of C++ due to bloat.
Re:OpenBSD base now free of C++ by troutwine on Monday March 14, 2011 @01:31PM (#2323464)
I didn't catch the word "bloat" in the linked article, nor really any hint of such a complaint. Rather, it seems like the OpenBSD has happily announced the removal of C++ in their base because of compilation speed issues.

> Groff was also one of the slowest parts in a full build...

C++ compilers might be many things, but zippy they are not.

Re:OpenBSD base now free of C++ by dchest on Monday March 14, 2011 @01:33PM (#2323472)
Well, C++ compiler is bloat, as is standard library. There's an effort to use Portable C Compiler (which recently reached 1.0 http://pcc.ludd.ltu.se/news/) to compile OpenBSD.

Plus, from mandoc website (http://mdocml.bsd.lv/):

Why? groff amounts to over 5 MB of source code, ...

Re:OpenBSD base now free of C++ by goalieca on Monday March 14, 2011 @01:36PM (#2323483)
> and its replacement is much faster in rendering manpages

Besides the build bloat, that certainly hints at it.

Re:OpenBSD base now free of C++ by tzs on Monday March 14, 2011 @01:54PM (#2323568)
Mandoc is a tool specifically for formatting man pages. Groff is a general typesetting tool. That probably accounts for most if not all of the difference in speed.
Re:OpenBSD base now free of C++ by jrockway on Monday March 14, 2011 @02:07PM (#2323637)
Probably a good choice. For a workstation, you might encounter the need for a typesetting system. But for your router, you probably don't need it. So I think OpenBSD made the right choice about what to ship in core.
Re:OpenBSD base now free of C++ by JoachimSchipper on Monday March 14, 2011 @03:29PM (#2324007)
troff is technically a general-purpose typesetting system, but how many people are still using it for anything other than formatting man pages? (La)TeX and other formats have pretty much taken over.
Re:OpenBSD base now free of C++ by wladimir on Tuesday March 15, 2011 @03:29AM (#2326449)
Indeed. I hope Linux distributions will follow with replacing Groff. It's a huge, slow, ancient system and for the purpose of formatting manpages it can be replaced by a 15-line Python script.

(this has nothing to do with C++ versus C, simply with removing some bloated UNIX legacy code)

Re:OpenBSD base now free of C++ by JoachimSchipper on Tuesday March 15, 2011 @05:48AM (#2326707)
Well, 15 lines is a bit optimistic. mandoc is ~25 000 lines of C, and not yet complete.
Re:OpenBSD base now free of C++ by wladimir on Tuesday March 15, 2011 @06:29AM (#2326777)
I was figuratively speaking. In Python it'd be less lines than C, but still a substantial project.
Re:OpenBSD base now free of C++ by jckarter on Monday March 14, 2011 @01:54PM (#2323571)
Orthogonal to bloat, libstdc++ is a large, ugly, and hard-to-audit attack surface that I'm sure OpenBSD is glad to push out of core.
Re:OpenBSD base now free of C++ by tedunangst on Monday March 14, 2011 @02:17PM (#2323692)
libstdc++ remains as much a part of core as it ever was.
Re:OpenBSD base now free of C++ by wnoise on Monday March 14, 2011 @03:21PM (#2323975)
But if nothing links with it, so there are no executables using it, that would seem to reduce the attack surface.
Re:OpenBSD base now free of C++ by tedunangst on Monday March 14, 2011 @04:26PM (#2324253)
The attack surface of "there is groff in /usr/bin" was never very substantial.
Re:OpenBSD base now free of C++ by wnoise on Monday March 14, 2011 @06:47PM (#2324864)
Get root to run "man foo" with the right manpath...
Re:OpenBSD base now free of C++ by jckarter on Monday March 14, 2011 @03:05PM (#2323899)
I see. So does this purge only consist of compiled executables then, with the standard C++ headers and libstdc++ still getting a pass?
Re:OpenBSD base now free of C++ by tedunangst on Monday March 14, 2011 @04:34PM (#2324309)
I think it's rather sad that HN has mostly ignored the meat of this story, and is instead focusing on a not entirely true one line throwaway.
Re:OpenBSD base now free of C++ by jckarter on Monday March 14, 2011 @04:39PM (#2324337)
Sad, but understandable. "OpenBSD writes their own ROFF interpreter" isn't very interesting, but "OpenBSD purges C++ from core" appeals to developers' strong emotional responses toward C++.
Re:OpenBSD base now free of C++ by JoachimSchipper on Monday March 14, 2011 @03:36PM (#2324043)
Yes. And it's not so much a C++ purge as it is a "unmaintainable GPL-licensed slow software" purge, as far as I understand. C++ does hurt comprehension, but it's not the main complaint.
Re:OpenBSD base now free of C++ by j_baker on Monday March 14, 2011 @09:06PM (#2325340)
Wait... so then libstdc++ isn't written in C++? Or is "core" different from "base"?
Re:OpenBSD base now free of C++ by tedunangst on Monday March 14, 2011 @10:11PM (#2325510)
Option 3: core/base is not actually free of C++.