4 ms·
Interfacing D to Legacy C++ Code [video]
- Aardwolf 12y agoIs C++ seriously considered "Legacy"? C is 1st on TIOBE and C++ is 4th (http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html http://www.tiobe.com/index.php/content/paperinfo/tpci/index....).
- logic_error 12y agoNot necessarily, but I would certainly think that a significant amount of legacy code written in C++ exists.
- chadzawistowski 12y agoI don't think the 'legacy' distinction is on the language, but a specific codebase. It's certainly possible to have a C++ codebase over 20 years old, which I would consider 'legacy'.
- coldtea 12y agoThe idea is that when you're working with D primarily, the C++ code you get to work with is legacy code you have to interface with.
- getsat 12y agoIf you haven't looked at C++ in a while, check out C++14. No naked pointers, inferred types, lambdas, code that is run at compile time (constexpr),... tons of new stuff. It's actually awesome now!
- harry8 12y agoThis is mild in the disparagement of other languages, which is sadly all too common. People want to be in early on the new thing as it's good for their career but don't want to hitch their wagon to a lame donkey. This begets language cheerleading. Stroustrup does it mercilessly himself. Dick Gabriel realising he'd backed a loser in Common LISP wrote "worse is better" and described C as a "virus." "OMG perl is line noise." You must have heard a thousand times and you've heard a hundred more about python's whitespace, lisp's brackets, haskell's utter incomprehensibility and lack of useful programs written in it. Dikjstra had a good one about Cobol "The use of cobol cripples the mind; its teaching should, therefore, be regarded as a criminal offence." Super polite to the great Grace Hopper wasn't he? The C++ "annointed" such as Alexandrescu who has now written "The D programming language" have referred to C as legacy since forever, Stroustrup can barely shut up about it. For for D, even the name of D is claiming "C and C++ haver now been superseded by this better thing." Whether that's true or not it's a big claim to put in the name of your language, why not just call it "Your language sucks compared to this new hotness"? If you don't care for either of these languages you could say something like this is how to "Interface the language you don't need with the language you never wanted." But the proper, polite, sensible dispassionate thing to write would be. Interfacing (existing) C++ code with D. FWIW I've worked on a C codebase where existing C++ code was referred to as "legacy" which made sense as naming in that project as they were converting a large part of the codebase from C++ to C as they felt it was better for the problem.