News for hackers. Stuff that matters.
Re:C++ Hating by makecheck on Sunday November 21, 2010 @08:38PM (#1928449)
I agree, but I think there is a middle ground, which is to use the strengths of multiple languages in the same app. And interestingly, one of the examples you gave is an app that I wrote (MacTelnet), which doesn't just use Python; it also calls C++ and Objective-C. :)

While C was the first language used, I added the others to gain their strengths, which include maintainability and access to powerful libraries.

Re:C++ Hating by gte910h on Sunday November 21, 2010 @10:07PM (#1928577)
Almost all languages use C libraries at some point (as that's what the OSes are written in), but yes, several of the apps are multilanguage.

I find python + weave.inline (insert C++ which is dynamically compiled the first time called) pretty awesome at getting performant apps which are fast to build and simple to debug.

Re:C++ Hating by corysama on Monday November 22, 2010 @01:24AM (#1928893)
I expect that the middle ground of C+HLL is more common than the purist approach simply because it makes sense to use the right tools for very different jobs.

I know that Eve is Python on top of a large, custom C++ code base. Civ and Blender as well. Adobe's Lightroom is a nice case study of 50% C++ and 50% Lua.

I've never used Python+Weave, but it makes total sense. I do think Python's built-in CTypes library is unfortunately underused. (highlights: You can create C-callable function pointers and you can call C DLL functions from default Python. No add-on libs required.)

Re:C++ Hating by gte910h on Monday November 22, 2010 @10:46AM (#1930103)
Almost all the alternatives are quite a bit easier to use than ctypes, with the exception of SWIG
Re:C++ Hating by gte910h on Monday November 22, 2010 @11:20AM (#1930251)
>interestingly, one of the examples you gave is an app that I wrote (MacTelnet), which doesn't just use Python; it also calls C++ and Objective-C. :)

What a small world.

Did you write the C and ObjC code it's calling, or are they independent libraries?