Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×
Programming IT Technology

The Future of C++ As Seen By Its Creator 424

holden writes "In a rare public talk, C++ creator Dr. Bjarne Stroustrup discusses his ideal in programming languages, as well how he sees the next version (and beyond) of C++ developing. He explains the general selection criteria used for adding new features, some of the legacy of C++, and many other interesting topics. Especially interesting is during the Q&A he explains his views of the embrace and extend mentality some implementations, such as VC++, have taken."
This discussion has been archived. No new comments can be posted.

The Future of C++ As Seen By Its Creator

Comments Filter:
  • by ardor ( 673957 ) on Monday August 13, 2007 @07:56AM (#20210535)
    If you really understand C++, migrating to C# is very easy. C#->C++ however...

    but, if we talk about managed languages, I'd go straight for Python or Common Lisp.
  • by PhrostyMcByte ( 589271 ) <phrosty@gmail.com> on Monday August 13, 2007 @08:09AM (#20210609) Homepage
    These are complaints, not trolls. I develop primarily in C++ and am ecstatic about C++0x, and dread seeing my favorite IDE/compiler get put on the backburner and not implement modern unmanaged programming. I don't want to wait 10 years to see C++0x and TR1. They could have easily included Dinkumware's TR1 implementation with it, even in a seperate tr1 namespace, and be sure - everyone would be much much happier.

    C++ was not meant to be RAD like C#, but VC++'s compiler and IDE are _far_ from perfect. There are still several annoying little issues you come across when you play with real C++. My point was that there is so much room for improvement in the C++ compiler but they have completely neglected it and the IDE to implement features for their proprietary languages. Which all in all, this being Microsoft, is not that surprising - but it is still a shame.

    You got one thing right - I did mean inline assembly (sorry, typos happen). It would be just as non-portable as using seperate .asm files - the functionality was there in the x86 compiler, am I to assume they completely rewrote the compiler enough that it would take vast effort to enable this basic functionality for x64?
  • Re:Next version? (Score:3, Interesting)

    by nwbvt ( 768631 ) on Monday August 13, 2007 @08:21AM (#20210663)
    Well for starters, your pet name for a programming language is not something you should continuously use while in a job interview. Basically what it tells the interviewer is that you really have very little experience with it, and probably have never heard it spoken before.
  • not bad... (Score:5, Interesting)

    by rgravina ( 520410 ) on Monday August 13, 2007 @08:28AM (#20210697)
    Recently, I've just started getting into C++, and I can't understand why so many people hate the language with such a passion. The thing is, if you need/want to write your program in a compiled language with plenty of library support, then aside from C, what options are there? I'm not trying to start a flamewar, but I figure if I want to say use C (or other C++) libraries and a compiled language then I feel C++ is much better option than C. One very smart and experienced C programmer I know hates C++ with a passion complaining that "it's too complex" and just rejecting it outright.

    I haven't yet written (or debugged) any large programs in C++, so that could be why I'm still enthusastic. Perhaps after some time with the language I might see what everyone is so worked up about.

    I'm reading through "Effective C++" by Scott Meyers, and although the language seems like it has its warts and complexity, it also offers a great deal of power and is a hell of a lot more fun to program in than C because you get the abstraction support of objects, namespaces etc. Streams - awsome. Shared (reference counting) pointers - awsome. Less need for the preprocessor - awsome. And the standard library (plus Boost too) is so vast... containers, algorithms, it's all there.

    Python is still my favourite general-purpose language, but if I need something compiled, then I don't see what is so bad about C++. Sure, Objective-C is a far better approach to the "lets-make-a-better-C" idea, but I'm not sure how to use it (and the standard library) outside of OSX or GNUStep.
  • Re:Just one thing (Score:2, Interesting)

    by smellotron ( 1039250 ) on Monday August 13, 2007 @08:33AM (#20210725)

    The main benefit of Java interfaces is that you can have a single class implement multiple interfaces without having to resort to something like C++'s multiple inheritance. So the Monkey class can also implement HairyInterface, EvilInterface and SlingInterface.

    The main benefit of C++ abstract classes is that you can have a single class inherit from multiple abstract classes without having to resort to something like Java's interfaces.

    You think multiply inheriting from a bunch of C++ abstract classes is somehow worse than implementing multiple Java interfaces? Abstract classes are interfaces, and inheriting from an abstract class is identical to implementing an interface. All of the problems you hear about for the evils of multiple inheritance go away when you start talking about pure abstract classes. There's no worrying about "which parent class method will be active when they have identical signatures" since there aren no parent methods.

  • Watch the video (Score:3, Interesting)

    by dysfunct ( 940221 ) * on Monday August 13, 2007 @08:35AM (#20210743)
    As an autodidact I'm easily bored by overly long and dry technical presentations of what could be read through in a couple of minutes, but this video is getting very interesting and funny after the first couple if minutes. Lots of insight into the process of creating the new standards and and all the thoughts that go into it, mixed with anecdotes, random trivia and geek humor by Bjarne Stroustrup himself. I'm actually considering downloading the 700mb xvid version of the talk and making me some popcorn to go with it. IMO, even if you're not a C++ geek it's actually worth watching.
  • by Dr. Manhattan ( 29720 ) <sorceror171@nOSpam.gmail.com> on Monday August 13, 2007 @08:39AM (#20210777) Homepage
    C++ isn't just "too complex". It's "so overly complex that it becomes a real problem." From The Art Of Unix Programming [faqs.org]: "Compactness is the property that a design can fit inside a human being's head. A good practical test for compactness is this: Does an experienced user normally need a manual? If not, then the design (or at least the subset of it that covers normal use) is compact... C++ is anti-compact -- the language's designer has admitted that he doesn't expect any one programmer to ever understand it all."

    With all the libraries and the plethora of features, it also has a large measure of Perl's problem: "Some designs that are not compact have enough internal redundancy of features that individual programmers end up carving out compact dialects sufficient for that 80% of common tasks by choosing a working subset of the language. Perl has this kind of pseudo-compactness, for example. Such designs have a built-in trap; when two programmers try to communicate about a project, they may find that differences in their working subsets are a significant barrier to understanding and modifying the code."

    The summary, here [faqs.org]: "When all is said and done, however, C++'s most fundamental problem is that it is basically just another conventional language. It confines the memory-management problem better than it did before the invention of the Standard Template Library, and a lot better than C does, but the confinement is brittle; it breaks unless your code uses objects and only objects. For many types of application its OO features are not significant, and simply add complexity to C without yielding much advantage. Open-source C++ compilers are available; if C++ were unequivocally superior to C it would now dominate... Consider using C++ if an existing C++ toolkit or service library offers powerful leverage for your application, or if you're in one of the application areas mentioned above for which an OO language is known to be a large win."

  • Re:not bad... (Score:1, Interesting)

    by Anonymous Coward on Monday August 13, 2007 @08:51AM (#20210893)
    For me, the answer has become D http://www.digitalmars.com/d/index.html [digitalmars.com]
  • Re:Just one thing (Score:2, Interesting)

    by jeti ( 105266 ) on Monday August 13, 2007 @08:54AM (#20210923)
    Can Haskell interface with our existing C and C++ codebase?
    Does a compiler exist for ARM architectures?
    And do you think moving over to Haskell would work for my
    colleagues? Some of them do not have a formal education in
    CS and PL and are not too eager to learn something new.
  • Size of iostream? (Score:3, Interesting)

    by tepples ( 727027 ) <tepples@gmai l . com> on Monday August 13, 2007 @09:00AM (#20210961) Homepage Journal

    Good afternoon everybody, I would like to start by including iostream.h into the discussion.

    After this we can get onto the main proceedings which might or might not return anything.

    We move to the future by emitting a string of "Hello world" before returning zero.

    This is the end of the discussion I hope it was informative.
    Yes, all quarter megabyte of it. A Hello World program that uses <iostream> has been seen to take nearly that much space [pineight.com] when compiled with g++ and linked statically with GNU libstdc++, on fairly recent versions of both MinGW and devkitARM toolchains. Compare this to an equivalent program that uses only <cstdio>, at under 6 kilobytes each. (Actual source code, binaries, and makefiles are available on request [pineight.com].) This hurts especially on one of the platforms that devkitARM supports, which has only 262,144 bytes of program RAM and no suitable shared library mechanism. There are some people who claim to have reduced libstdc++'s <iostream> overhead by a factor of four, but they're not revealing how they did it other than a vague "RTFM".
  • by hr.wien ( 986516 ) on Monday August 13, 2007 @09:13AM (#20211069)
    Why does everyone coding OO in C++ seem to think you need to new and delete every damn object? Use the stack and the RAII pattern whenever possible (which, in my experience, is most of the time). It'll make your code both cleaner and safe from resource leaks.
  • Replacing C++? (Score:5, Interesting)

    by Anonymous Brave Guy ( 457657 ) on Monday August 13, 2007 @09:14AM (#20211079)

    C++ is far too complex yes. But there is nothing that can really replace it. A language which supports functional, generic, procedural, object-oriented programming, with static typing, metaprogramming, and heavily geared towards native building?

    The thing is, most development projects that use C++ today don't need all of that.

    C++ is a fine, pragmatic tool, and I have great admiration for Stroustrup's ability to build such a useful thing. C++ is also a powerful systems programming tool.

    But C++ is not a good language for most application development, which is what a great deal of code written in it really is. I think there are several separate but somewhat related reasons for this.

    One is the safety argument. Most people simply don't need the flexibility/footshootability [delete as applicable] of C++. You need only look at the much-hyped field of garbage collection to see that (a) many professional developers find this one feature useful that they regard Java as superior to C++ for this reason alone, (b) many more professional developers have no clue about the overheads involved (which are almost zero for typical applications using modern approaches to GC implementation), and most importantly (c) a great many developers using languages without GC make mistakes that developers using languages with GC wouldn't. Similar arguments apply to other routine problems, such as pointers/NULL.

    The second is the expressive power argument. Life is too short to be using programming languages with primitive, error-prone control flow constructs, functions that aren't first-order entities, no syntactic support for common data structures, crude macros, header files, etc.

    Third we have the standard library argument. Yes, yes, you can get a C++ library for almost anything. That's not the point. The key word is "standard". Take a look at the huge practical success of Java and Perl, and tell me the vast Java standard library and CPAN have nothing to do with them. Sure, C++'s standard library is, technically, of a higher quality than most. But it still has stupid flaws (string support and IO streams are both fundamentally broken, for example). More seriously, it has stupid gaps. In the 21st century, it's hard to seriously advocate application development in a language with no standardised support for user interfaces, networking, concurrency, file systems, etc. No, I'm not going to spend days trying to find the right non-standard library for me. Non-standard libraries are for solving significant problems, where the difficulty and scope make it worth investing the time to find and hook in someone else's code. They're not for trivia that everyone uses all the time.

    And finally, we have the tools argument. Working with header files sucks, and while just about everyone else is playing with their funky, auto-refactoring, navigation supporting editors, what do we have? VC++ (where refactoring still isn't available in native C++) and Eclipse (which is C++ forced into a Java-like IDE)?

    The really scary thing is that reality bites now. It's not like I'm the first person to identify these practical flaws with using C++ for application development. It's not like other people haven't developed languages and tools with all these improvements already. And yet C++ continues to be one of the most important application programming languages today. Why?

    Momentum. That's why. Building a new programming language with a syntax that doesn't look like C is asking for trouble; just look at the arguments Python sees over whitespace. (Curiously, I've never seen such complaints made about Haskell. Perhaps this shows a difference between the insight of your average professional programmer vs. your average language geek academic?) More to the point, trying to advocate a new programming language for industrial application development that isn't some form of block-structured, OO-based clone is asking for trouble.

    I'm hopeful that over the next few years, as hardwar

  • by MORB ( 793798 ) on Monday August 13, 2007 @09:17AM (#20211111)
    Bullshit. They could (should) start implementing TR1 and even parts of C++0x right now so that they can have a fully compliant implementation shortly after the standard is officially released. That's what gcc is doing. It also helps the stadndardization process because they can see whether the current draft has serious issues and fix them.
    gcc has a TR1 implementation and they have started implementing some of the c++0x features (that should be enabled explicitely on the command line)

    In any case, VC++ majorly sucks. It's slow (and gets significantly slower at each new version), takes ages to do elementary things (I've seen it take 10 to 20 seconds to open a fucking text file - and a small one at that), has a sucky interface (as of vs2005, the project properties dialog was still not resizeable and full of small text fields meant to contain lots of data, like list of libraries. And don't even get me started on the project configurations dialog), don't really have any features not found anywhere else and they don't even work that well (how easily the code completion system fails). To do anything really useful like some automated refactoring operations, you have to install a third party tool (visual assist)

    The project management, with its file/directory hierarchy which is not taken directly from the file system, is completely stupid and annoying (I worked at a MMORPG company on a solution containing dozens of project, and the hierarchy layout in visual studio and the file system were completely different, a fucking nightmare)

    It also don't play well with version control tools, because it like to save the contents of the xml in project files in a different order each time, so even a trivial change will show lots of diffs in version control, making it impossible to figure out which compilation setting was changed frmo a version to another, for instance.

    I don't know, I just can't find any redeeming feature in this IDE. As far as I'm concerned, when it comes to C++ it's a worthless piece of shit that is only used out of market inertia. It used to be alright, but the performance went down while the features stayed roughly the same except for those awesome 3d toolbars, so now it just doesn't seem to be worth its (rather high) price point compared to free alternatives like eclipse/cdt (or even kdevelop 3.4 if it was available for windows).

    And don't come to me saying that a free version is available, its irrelevant to the professional world which have to pay for the dubious privilege of using this thing.
  • by everphilski ( 877346 ) on Monday August 13, 2007 @09:34AM (#20211263) Journal
    C++ has gone the way of Fortran

    Sadly, I generate new Fortran code on a regular basis. I wish I was generating new C++ ...
  • by roman_mir ( 125474 ) on Monday August 13, 2007 @10:08AM (#20211603) Homepage Journal
    Concerning Java, Dr. Stroustrup says "Java isn't platform independent; it is a platform. Like Windows, it is a proprietary commercial platform. That is, you can write programs for Windows/Intel or Java/JVM, and in each case you are writing code for a platform owned by a single corporation and tweaked for the commercial benefit of that corporation." - shouldn't this count for a Flamebait at this point, that Java is Free Sourced?
  • Re:not bad... (Score:2, Interesting)

    by rgravina ( 520410 ) on Monday August 13, 2007 @10:29AM (#20211795)
    D looks very very interesting. I just had to use C++ for my current project for a few reasons (needed to work with wxWidgets and create a library which is accessable from as many languages as possible - so a C++ and maybe a Python wrapper a some point (using SWIG, or Boost.Python, I suppose).
  • Absolutely correct (Score:1, Interesting)

    by Anonymous Coward on Monday August 13, 2007 @11:45AM (#20212783)
    There's no way to implement clean callback interfaces in C++ without tons of noisy syntax. Delegates are such a natural idea and would be such a nice fit for C++ (static type checking, fixed value size). The method pointers have absolutely no use and have weird semantics.

    Delegates deal with 90% of all practical uses of closures, but I guess acknowledging that would be too much for some people's pride.
  • by Cassini2 ( 956052 ) on Monday August 13, 2007 @12:17PM (#20213173)

    Do you code C++ only for PC-class or bigger machines? Or do you also code C++ for an embedded system with small (e.g. 256 KiB) RAM? If so, have you figured out how to compile a program (even Hello World) and statically link it against a Free implementation of the C++ standard library so that the executable is smaller than 200 KiB? I tried GNU libstdc++ with MinGW and (more to the point) devkitARM, and in each case, I got a binary roughly 250 KiB in size.

    I have compiled C++ code down for a PIC microcontroller with 8 kB of RAM. The trick is to use only stuff from the C99 standard. Then you compile the code using VC++ on a Microsoft PC and do your unit testing. You can then rename all the CPP files to C files, and recompile under the PIC compiler and generate valid code.

    In practice, the VC++ compiler is fairly non-standard, and the renaming of files business sucks. My solution was to move all the code into header files (.h), and then include the headers from stub .CPP and .C files.

    The interesting thing was, the development time on the project where I did this was drastically reduced. A full fledged C++ compiler, like Microsoft C++, made program test much simpler. Development time was dramatically reduced because of a much simpler test cycle. This resulted in much more reliable code being given to the PIC, further simplifying the embedded development/test cycle. Debugging an embedded platform is much tougher than debugging on a PC, so any debugging that can be done on the PC is really big bonus.

    Another interesting point is that for an embedded platform, particularly the really small chips, you may be better off turning off the entire C Run-Time Library. You aren't going to use any functions from it anyways. Calls like printf() and iostream make little sense on devices lacking basic terminal I/O commands.

    Additionally, on devices without virtual memory, you want to avoid calls like new and malloc(). Make everything possible stack based, allocated only once at known program points, or allocated statically. Minimize the number of random allocations and deallocations. If you are trying to prove correctness for long uptimes, you need to prove that malloc() always succeeds. That is a very difficult thing to do given the potential complexities of external memory fragmentation and memory leaks. There is no Virtual Memory available to cover up inefficiencies in your code, in new, or in malloc(). Exceptions are also bad, because you have to prove that every single one of them is handled correctly and won't cause run-time issues. Besides, exceptions, new and malloc() are big sources of random uninitialized memory variables, and often result in slower code. All unexpected behavior on an embedded platform is bad.

    On an embedded platform, for long up-times, you must also consider the possibility of hardware memory corruption. As such, statically allocated variables (non-indexed) are nice. You can read directly from a fixed memory location, and effectively verify allowed values. It is also desirable to keep the program simple and straightforward. This makes it easier to prove correctness and simplifies unit testing.

    To any potential coders out there: this approach is completely non-standard, and I don't really recommend it unless you are working with embedded devices. My coding style on a PC platform differs significantly from my coding style on memory constricted embedded devices (like PICs). Also, on an embedded device, program length is usually small (for speed). As such, fast obtuse fragments of code are tolerable (if they are commented.) For a PC, programs are bigger, and obtuse code is not nice.

  • by Anonymous Coward on Monday August 13, 2007 @12:17PM (#20213179)
    a new language like D and not just an improved C++.

    As a C++ programmer, I can tell you that it is nearly impossible for C++ to make coding, compiling and debugging easier without redesigning the language.

    Coding: Name one C++ editor or IDE that offers accurate code completion or code refactoring (compared to other languages.) I've tried Source Insight, SlickEdit 2007, Visual Studio 2005, Understand for C++, Vim, etc. and it is clear C++ is too complex compared to most other mainstream programming languages.

    Compiling: Implementing a C++ compiler is far too difficult. And compiling takes too long even when you use C++ idioms like pimpl.

    Debugging: Sure, boost.org's smartpointers and RAII are helpful but how many hours do C++ programmers spend tracking down bugs that would've taken minutes (if not seconds) to track down or avoid in other programming languages?

    Why do I use C++? Because it is compiled, has numerous 3rd-party libraries, and is widely used. Like Windows XP, it might be a pain but it is so widely used that you'll have no problems finding employers that will pay you to use it.

    Simply put, we deserve something better than C++ and it isn't going to be enough to enhance C++ because a full redesign is needed in order to address the issues noted above. We need and deserve a language that takes what we've learned from C++ and is designed from the ground up to address those issues.

    So far, D programming language seems to offer the best hope, and some really talented C++ gurus like Walter Bright and Andrei Alexandrescu are involved.
  • by Anonymous Coward on Monday August 13, 2007 @12:19PM (#20213201)

    C++ has many problems. Some, like "an array is a pointer", it inherited from C. Some were mistakes in the original design that were later fixed, like unchecked downcasts, "this" as a pointer rather than a reference, and the lack of generics. And some are there because Strostrup is in denial about the problems, like the fact that the language gives no help with either thread or memory management.

    Memory management remains the biggest problem. The fundamental problem is that C and C++ require the programmer to obsess on who owns what, while providing zero assistance in managing that information.There are ways out of this, involving syntax and compiler support for owning and non-owning pointers. But instead, attempts have been made to paper over the problem with templates. This never quite works, because for some things you still need a raw pointer, which breaks the abstraction. The history of auto_ptr (up to standard revision #4 now, I think) makes this clear.

    Bolting on a garbage collector doesn't help much in a language with destructors; see the mess in Microsoft's "managed C++". If you're going to go with a garbage collected approach, it's better to go to a language designed for it, like Java.

    Most of the standards effort is going into template features that few will use and fewer still will use well. Trying to use the template expansion engine as a general purpose macro system is a terrible idea for production code. But it has a big fan club on the standards committee. Worse, the C++ commitee does very little to improve language safety and reliability. Which is why we still have buffer overflows in C++ code, fifteen years in.

    Incidentally, none of this has anything to do with C++ being compiled directly to machine code. There have been safer compilable languages usable for system-level programming. Modula 3 was probably as good as it got. But that language died when DEC went under. It's possible to hard-compile Java; there's a version of GCC for that, and it's getting some interest in the embedded community. The problem could be fixed. But it won't be, because the people responsible are in denial.

  • by Anonymous Coward on Monday August 13, 2007 @12:37PM (#20213401)
    Until it can support Lisp style macros, it's just a sad little subset of Lisp, much like Python* or Ruby* or F#...

    Have a project that would actually get much benefit from lazy evaluation and static typing? Lisp does both just fine, use macros to define a DSL in about 20 minutes. I do it often enough to get static typing so the compiler** can optimize things better that I saved it as an asdf system and just have Lisp load it at startup.

    And just as often, dynamic typing is the obvious way to go. Same applies to lazy eval, sometimes it makes sense, sometimes not (and thank god for it when it does).

    And monads? A hack that admits for most projects outside of academia you need state to Get Shit Done. Even if it makes sense to write a portion or all of the project in a purely functional style, once again Lisp handles that without a second thought. It's simply a matter of not using assignment.
    And if you're really that addicted to them (they *do* have some nice qualities), once again it's a simple matter of macros.

    Parallelism? That's one of the things functional style makes sense for. Big deal *shrugs*.

    Your "future" has already been here for half a century. Everyone else is just catching up, implementing more and more of Lisp as they go.

    *I wish there were something like Slime for Python or Ruby, when I'm forced to use these weird halfhearted Lisp clones for bill paying purposes.

    **Compiling to raw machine code mind you, much like Haskell can be native or VM. Lisp hasn't been purely interpreted in fucking eons. Admittedly, GHC's Haskell -> C translation is pretty slick, but most Lisp users don't have a need for it, and heavy work is long underway for those that do (CLiCC for Common Lisp, Chicken for Scheme, among others for both), or quite often any given CL system will happily save a core image that bundles the "runtime" (what's the proper word for this?) needed, or there's ECL or such.

    And as a side note, I'm eager to see what becomes of Scheme when R6RS is final. Its tail recursion, call/cc, cleaner syntax, etc... have been sexy as hell for quite some time but without a standard method for handling packages/libraries it has remained barely an academic blip in the Lisp world. I can easily imagine Common Lisp becoming regarded as basically a Scheme that already has a set of popular libraries loaded.
  • Rant (Score:2, Interesting)

    by treak007 ( 985345 ) on Monday August 13, 2007 @02:22PM (#20214745)
    Virtual machines like the JVM are all the rage nowadays. Sure they are cross-platform and have some benefits, but they will never replace true natively built code. C++ is a powerful tool that I use daily, and I would said it was anything but dying.

    C++ has a lot of different features, which is why some find it confusing, but it is those many features which allow the language to be so flexible. Whereas a language, again picking on java, such as java forces the programmer to follow a very strict object-oriented form, C++ gives the programmer a choice as to how they want to write their code. I can write very object-oriented code, with features java doesn't support such as operator overloading and multiple inheritance, or I can write very functional-based code that resembles C. Also, C++ gives the programmer true control over what is going on inside their application. In java for example, objects are passed by reference and primitives are passed by value. In C++, I can specify which of the two I want for either type on a per argument basis. Another example is exceptions, which are known to be a rather slow feature in a language. In a language such as Java, again sorry java fans, exceptions are an integral part of the runtime interpreter. In C++, if I find that I don't wish to use exceptions, I can disable support for them and regain that performance boost that was lost at the hands of exception checking.

    Alright, alright..I am done ranting for now. All I guess I am trying to say is that yeah, maybe C++ is a bit more confusing to a beginner then interpreted languages and the like, but it is those features which can be confusing that allow a programmer to really control their code. The better the programmer understands what the code they are writing is doing, the better code they will write. That being said, long live bit flags, unsigned variable types, multiple inheritance, operator overloading and raw pointers!

    -Your Local /. C++ fanboy.
  • by Anonymous Coward on Monday August 13, 2007 @04:56PM (#20216725)
    Please try WinDbg--it's only a little harder to use, far more powerful, and updated more often. It's also a free binary from Microsoft, who use it extensively inhouse.

    Ditto on VC++ being a crummy editor. In fact almost all the blue badges (full-time Microsoft employees) I met were dedicated vim users, except for a few Emacs freaks like me.
  • by ChrisA90278 ( 905188 ) on Tuesday August 14, 2007 @12:55AM (#20221383)
    I was carful when I wrote "flight control software" and not just "flight software". Seems they are going with Ada for the approx 4% of the code that really matters. The JSF will have about 15 million lines of code aboard. So only 150,000 lines is considered "safely critical" I guess. That's good because I doubt anyone could write 15M bug free lines of code. 150K will still be "way hard" but do-able. I read Lockeed's presentation where they jutified C++. Their reasoning was simple: They would not hire enough Ada programmers. They said they could not train them either because people don't see a career in Ada anymore so they leave. The bulk of the pages was numbers to support the claim that there are not enough people to write 15M lLOC in Ada and worse, in futrue years there will be no one to maintain it. Notice that they are not really writing in C++. They are writing in a very restricted sub-set of C++ and the subset is defined in a way to facilitate testing and inspection.
  • by sashang ( 608223 ) on Tuesday August 14, 2007 @07:27AM (#20222981)
    Check out OCaml. It has C++ like features without the headache. It's more advanced than D and has great performance characteristics. It supports type inference (so you don't need to remember the type of the variable), static typing, generic programming (templates in c++) via modules and functors, concepts (which are meant to be part of c++0x) via signatures, virtual functions via subtyping, and garbage collection. It's also a functional language so you get the core features of functional languages, like pattern matching.
  • Re:Rant (Score:2, Interesting)

    by treak007 ( 985345 ) on Tuesday August 14, 2007 @12:33PM (#20226203)

    What I can say, though it is not quite relevent to the discussion, but I will anyway... the issue with calling the GC directly -is- an incredibly easy to find bug =P In my opinion, ANYTIME the GC is called directly, thats a bug right there, so finding it can even be automated!!! Tadah! (Seriously though, NEVER EVER EVER call the GC directly. If you THINK you have to, its because there's an architecture problem somewhere...).
    Interesting. When I code in Java, I try to take control of the program as much as possible, which usually results in me fighting with the JVM. I acknowledge that writing Java code is like writing for a separate os, which acts completely different then the host os and that to write effective Java code, it becomes necessary to familiarize oneself with the JVM and all its nuances.

    This discussion reminds me of a very interesting book [amazon.com] that one of my professors lent to me which was a sort of puzzle book describing some small intricacies within the JVM that could lead to rather large bugs. Even with higher-level programming languages, I still believe it is necessary to have a strong understanding of the underlying implementation. So in other words...

    doesn't mean you can hire crap programmers, no matter how much the project managers think so!
    Exactly!!
  • by MobyDisk ( 75490 ) on Thursday August 16, 2007 @08:43AM (#20247825) Homepage
    What is odd to me is that I see new stuff written in C all the time for embedded systems, *nix code, drivers, etc. It's odd because C++ is merely language extensions on top of C. There's really no down-side to using C++ at all (queue the thread of trolls telling me how awful OOP is and why C++ forces them to use it). My guess is that the problem is g++: I am currently writing some code for the Nintendo DS, and if I compile it in gcc the code is 100k smaller than when I compile the same thing in g++, even before using the OOP features. I don't know why, but I know other people have reported the same issues. This is perpetuatating the myths that C++ is bloated. Really, we need C++ in a lot of ways but the tools are making it look bad.

The Macintosh is Xerox technology at its best.

Working...