back to article Stroustrup on next-gen C++: I didn't want to let go of my baby

C++ 11 is “far better than previous versions”, says the inventor of the language Bjarne Stroustrup. He was speaking at an online event marking the launch of Embarcadero's C++ Builder XE3, a rapid application tool targeting Windows and Mac OS X. C++ Builder XE3 is a promising but curious product. Delphi and C++ Builder were …

COMMENTS

This topic is closed for new posts.

Page:

  1. 1Rafayal

    C++ put me off programming

    Unfortunately, the title is true for me. When I was first introduced to C++ I hated it and questioned my choice to become a software developer. That was back in my uni days.

    Since then, I have discovered the joys of languages like Ruby, Java and C#. I think these languages made it easier for me to get into development because they were so easy to understand (especially the close relationship between c# and Java).

    These days, I find myself going back to C++ more and more and I have been watching this new version closely.

    I feel that one of the key factors that has lead to the poor teaching of C++ in colleges and universities is down to the sponsorship that they often get these days. Uni's are now proud to exclaim that they are sponsored by Microsoft and Oracle, pushing their respective technologies. The end product is someone who can build software in VS or Eclipse and the end product will more often than not be something written in VB.Net(eugh), c# or Java.

    I think I read somewhere that Microsoft now plans to push C++ 11 in Visual Studio, if this is true, I dont know if this is a bad thing or a good thing. I guess time will tell.

    1. Anonymous Coward
      Anonymous Coward

      Re: C++ put me off programming

      C++ is confusing for new users since they have often started with procedural languages, so moving to the concept of objects is a hard switch for some people.

      It's syntax isn't a clean as say Java either. Plus there's some big words like polymorphism which also make people confused.

      C++ and C are still the best languages for writing fast code without the need for awful virtual machines or interpreters. But you accept that you aren't going to write portable code either.

      1. NomNomNom

        Re: C++ put me off programming

        C++ is harder for people because of pointers

        1. AndrueC Silver badge

          Re: C++ put me off programming

          Nah. You don't have to use pointers very much these days. Stick to RAII techniques and although you'll still need 'new' to create objects occasionally you'll hardly ever need delete.

          Most objects and structures will happily sit on the stack or as object data members and nary a pointer in sight.

          1. Brewster's Angle Grinder Silver badge

            Re: RAII @AndrueC

            Nah. You don't have to use pointers very much these days.

            Yeah, but the concept of a pointer (either smart pointers or iterators) is pretty widespread through C++.

        2. Brewster's Angle Grinder Silver badge

          Re: C++ put me off programming @NomNomNom

          I came to C++ from assembler but still found pointers hard.

          The difficulty, I think, is not pointers but the subtleties of rvalues and lvalues. In most languages you can write x = y without understanding x is a reference or what that truly means.

          In assembler assignment between registers is magical, memory locations are the lvalues, and you always explicitly convert an lvalue into an rvalue by fetching it into a register.

          C/C++ sits between the two paradigms. You finally have to understand how the high-level view maps onto the low-level one. You have to recognise an implicit lvalue-to-rvalue conversion occurs to y in x = y but that a literal 2 is already an rvalue when you code x = 2 You have understand that operator& returns an rvalue. And you have to understand that assignment effectively means *&x = y

          Building an accurate mental model of those steps is what's tricky. And C and C++ are the only languages that depend on you understanding that.

          1. disgruntled yank

            Re: C++ put me off programming @Grinder

            When I came to C, it was assembler that helped me make sense of pointers: the notion of transferring a value between a register and an address stored in another register was familiar.

        3. Matt Bucknall

          Re: C++ put me off programming

          The only time raw pointers have any place in C++ is when you're wrapping up legacy C code. In some ways, I wish C++ had never attempted to be backwards compatible with C - So many programmers treat C++ as C with classes (aka structs with functions), which doesn't even come close to utilising the language properly.

          It also probably doesn't help that there are very few well written C++ libraries/frameworks out there to at least serve as an example of how C++ should be done properly. The STL is fantastic these days, especially with all that C++11 has added. Boost libraries aren't bad, but even having been a C++ programmer for 12 years, I sometimes find the complexity rather irritating. The problem is that, for the most part, the STL and Boost are libraries of generic classes and functions. Generics are absolutely right for containers, algorithms and such, but do nothing to serve as examples of how framework level or end application code should be structured. That isn't a criticism of the STL or Boost by the way - Certanily, as far as the STL is concerned, it is entirely appropriate that it be a library of generics and not much more because C++ is a systems language and its standard library must minimize its dependencies on any particular underlying platform.

          At least with languages like Java, Ruby, Python etc. there are plenty of libraries (for better or worse) which beginners can both use and draw inspiration from when designing their own code. C++ is always going to be bewildering to the beginner without good real world examples to illustrate the language. Unfortunately, some of the more prevalent C++ frameworks, such as QT and wxWidgets treat C++ like it's still 1998 (arguably for legitimate reasons) and are, I think, examples of how things should NOT be done in modern C++.

        4. Herbert Meyer
          Meh

          Re: C++ put me off programming

          Not harder to use, more dangerous.to use.

        5. David Heffernan

          Re: C++ put me off programming

          Plenty of other languages have pointers and are easier to learn and use than C++/

        6. Alfred
          Headmaster

          Pointers aren't difficult. They're very simple. About the same level of complexity as an integer.

          They're just often very, very, very badly taught with horrifically broken analogies or ridiculous descriptions involving roads and house numbers or some other such unhelpful nonsense.

        7. Anonymous Coward
          WTF?

          Re: C++ put me off programming

          "C++ is harder for people because of pointers"

          Any programmer who finds pointers confusing should consider another career since memory addressing is a fundamental part of how a CPU works.

        8. NomNomNom

          Re: C++ put me off programming

          why the hell did I get downvoted for typing "C++ is harder for people because of pointers"

          I mean I don't care about the downvotes themselves, but I didn't expect them so it's a sign that I failed to predict how people would react, and I don't like that.

          Maybe people thought I was complaining about the language? No I don't find C++ hard. I was just pointing (haha) out my observations that people who find it hard tend to do so because of the pointers (and references) all the & * [] stuff.

        9. John 62

          Re: C++ put me off programming

          C++ is harder for people because there are pointers AND references.

        10. Anonymous Coward
          Anonymous Coward

          Re: C++ put me off programming

          C++ is harder because it was never meant to be easy. There were other priorities. Still too much memory management for anyone without asbergers.

      2. petur
        WTF?

        Re: C++ put me off programming

        "C++ and C are still the best languages for writing fast code without the need for awful virtual machines or interpreters. But you accept that you aren't going to write portable code either."

        Depends on your definition of portable code. For me portable code means I can take it to another platform, compile it and it works. C++ does that fine.

        You're thinking of portable binaries...

        1. Christian Berger

          Re: C++ put me off programming

          "C++ and C are still the best languages for writing fast code without the need for awful virtual machines or interpreters. But you accept that you aren't going to write portable code either."

          Not really, modern Pascal variants will generate fast code without the need for awful virtual machines or interpreters. Plus unlike C/C++ it's even portable. :) And you can turn on array bounds checking and even integer overflow checking, if you want.

          Seriously the big problem with C++ and to lesser extend C is the sheer amount of features. There is no clear concept behind it, it's just a pile of non-orthogonal features. Virtually nobody knows all of C++. Stroustrup claims that isn't a problem since you get by with just a tiny bit of it. In reality in a team everyone knows a different tiny bit of the language making it impossible to understand by the others.

          C and C++ are also really bad "first" languages since you already need to know a fair amount of assembler to understand all the little important problems you will face.

          BTW, porting C code from one machine to another isn't absolutely trivial. For example I once wrote a little piece of software running on both a Raspberry Pi and my desktop PC. The Raspberry Pi stored a timeval struct directly into a file and the PC was supposed to read it. Guess what, it didn't work, since my Pi has 32 bit integers for both values, while my PC had 64 bit values for both. Binary formats in C are not compatible. They are in fact not supposed to be since that's where Unix comes in. On Unix systems you would store that data in text form. And text would be compatible between multiple machines.

          1. Ben Hanson 1

            Re: C++ put me off programming

            "The Raspberry Pi stored a timeval struct directly into a file and the PC was supposed to read it. Guess what, it didn't work, since my Pi has 32 bit integers for both values, while my PC had 64 bit values for both."

            Are you really advocating passing binary files between different architectures? For a pet project? You imply this would work just fine with Pascal. Is that because no-one has bothered writing a 64 bit Pascal compiler, or that Pascal doesn't support 64 bit times?

            What was your point again?

      3. Ru

        Re: C++ put me off programming

        "C++ and C are still the best languages for writing fast code without the need for awful virtual machines or interpreters. But you accept that you aren't going to write portable code either."

        I wouldn't say that virtual machines are intrinsically awful; the JVM is a very nice dev platform (I've used jruby, scala and java and various combinations of the three quite satisfactorily) its just painfully slow to start and devours a slightly depressing amount of memory. Contrast that with, say, the Lua VM which is tiny and startlingly fast... but lua only. They could be done better though, that's for sure.

        Almost all my C++ code is platform independent, because I use it to write general purpose library code which can then be linked against whatever platform specific nastiness you like. If you're not using any OS-specific library calls, you can stick your code into a standard shared library behind a bunch of functions with a C-calling convention and call them from pretty much any other language on earth than supports an FFI.

      4. Lee Dowling Silver badge

        Re: C++ put me off programming

        C++ put me off C++. I read the books, I played with the language, I knocked things up and they worked. But it wasn't until I had to read someone else's C++ code that I realised what an horrendous mess there is to be made with perfectly good code, and how hard it can be to turn that back into something you can understand.

        I loved learning about OOP, back in the day, and loved the concepts presented therein. But I've yet to find a usable and suitable syntax for expressing the ideas contained there. As such, I've stuck with C99 - which does everything I want and ever need, integrates with C++ libraries if I really need it to, allows me to *choose* how to program (hell, with a lot of compilers, I can mix and match C99 and C++ code and not even notice), is standardised across compilers (C++ was, historically, a mess - and may still be for all I know), is blindingly fast still, doesn't need interpreters or virtual machines, and can even be read by C++ programmers with ease (which is something that I can't claim works the other way round).

        I find it quite interesting just how many libraries are actually still C99-or-similar, under the hood, and how easy it is to work with everything still just using C99 instead of C++. C++ hasn't become the major takeover of the language that I expected to come for years, and C++11 doesn't look like that will be either. You can still teach someone the entire C language and the standard library in a matter of hours. You could waste that just explaining how to use some of the more complex features like variadic templates correctly.

        Yes, I grew up in an era of what is now referred to as procedural programming (it was called functional programming back in my day, but that's been subverted for something now related to mathematics more than programming, but I think that both "procedural" and "functional" were originally an accurate description - you're providing procedures, like NASA space operation procedures, to the computer to have it perform a function), and that almost certainly colours my view but the fact is that at the end of the day I want to give my computer a set of instructions that it carries out as I've told it to. The OOP overhead removes a lot of control which, if you're happy to give up, is fine. I don't like it, though.

        As such, almost everything I write is in C99, can be read by any half-decent programmer, used by any half-decent programmer, extended by any half-decent programmer and get the most out of the machine even if it means I have to organise my code a little more carefully. It interfaces with everything, compiles quickly and without surprises and ports to any platform I like. And almost certainly the first compiler for any new platform will be a C compiler, not a C++ one (even though that can then follow quite quickly).

        Call me old-fashioned, but C99 was where decent programming standards stopped as far as I'm concerned (which is probably another reason that C++ implementations are rarely completely compatible, and why it's taken so long to standardise the language, whereas C has been through several standardisations and added decent functionality that you can *see* and *use* each time, and which quickly find their way into compilers). Everything since then has been syntactic sugar that makes code unreadable, and sometimes unpredictable, and still has to be (pretty much) C99 compatible once you take that sugar away, and for which you need to have learnt C syntax to start.

        1. Brewster's Angle Grinder Silver badge

          C99 vs C++ @LeeDowling

          The answer to every C99 vs C++ debate is C99's tgmath.h Ughh. We'll give you magic overloading but not the real thing.

          And as best I can follow, your argument amounts to a lack of self restraint. Yes, C+++ contains many guns, but you don't have to fire any of them. Even the gcc folks have moved over to limited subset of C++; here are their reasons:

          • C++ is a standardized, well known, popular language.
          • C++ is nearly a superset of C90 used in GCC.
          • The C subset of C++ is just as efficient as C.
          • C++ supports cleaner code in several significant cases.
          • C++ makes it easier to write and enforce cleaner interfaces.
          • C++ never requires uglier code.
          • C++ is not a panacea but it is an improvement.

          1. Yet Another Anonymous coward Silver badge

            Re: C99 vs C++ @LeeDowling

            C does give you a defined ABI that you can make your lib link against other libs.

            Using C++ you need to either build it yourself or ship the customer dozens of different version for different compilers and build settings.

        2. Amonynous

          Re: C++ put me off programming

          "Yes, I grew up in an era of what is now referred to as procedural programming (it was called functional programming back in my day, but that's been subverted for something now related to mathematics more than programming, but I think that both "procedural" and "functional" were originally an accurate description."

          I grew up in that era too (well did my Comp Sci degree in 1986-88, not entirely sure that counts as growing up though). IIRC from lectures, procedural and functional programming are two different paradigms. Simply put, procedural programming is a flat-pack furniture assembly instructions approach to programming, i.e. "Take Tab A and insert into Slot B. Now bend over, look between your legs and tighten Screw C". Functional programming is an approach in which you write the code as a series of nested functions, and is NOT the same thing as procedural programming.

          A spreadsheet (e.g. Excel) is actually a good example of a functional programming language, provided you don't use any VBA or Macros in it. Any cell may contain a value, in which case it is implicitly a function which returns the value, or it may contain an "= somefunction()". Any function may have further functions nested within it (including references to cells which main contain either values or further "= somefunction()", etc. The spreadsheet simply keeps evaluating nested functions to the lowest level until it produces the desired result.

          ISTRC it can be mathematically proven that any functional program can be expressed as a procedural program and vice-versa (and empirically it is obvious that this is the case; the only means by which functional programming languages can be executed is by compiling them to machine code, which is a form of procedural programming).

          Functional programming languages are not widely used for software development (though vast hordes of spreadsheet monkeys use them every day without realising it). You can figure out why if you try to code in a procedural programming language by creating user defined functions which consist of a single line which returns a value calculated using only using assignment, operators and other in-built and user-defined functions (which in turn can only consist of a single line). So no sequences of lines of code, no iteration, no control structures, etc.

          You absolutely CAN write any program that you could write in procedural (or Object Oriented) manner within these constraints, but would you want to, and even if you did, what would happen if you tried to maintain it as requirements change, or re-use your code?

          1. John Smith 19 Gold badge
            Boffin

            Re: C++ put me off programming

            "Functional programming languages are not widely used for software development (though vast hordes of spreadsheet monkeys use them every day without realising it). You can figure out why if you try to code in a procedural programming language by creating user defined functions which consist of a single line which returns a value calculated using only using assignment, operators and other in-built and user-defined functions (which in turn can only consist of a single line). So no sequences of lines of code, no iteration, no control structures, etc."

            IIRC LISP is generally called a "functional" language.

            Of course it's functions are more than 1 line long.

        3. Someone Else Silver badge
          Holmes

          @ Lee Dowling -- Re: C++ put me off programming

          As such, almost everything I write is in C99, can be read by any half-decent programmer, used by any half-decent programmer, extended by any half-decent programmer and get the most out of the machine even if it means I have to organise my code a little more carefully.

          Yes, and almost everything I write in C++ can be read by any half-decent programmer, used by any half-decent programmer, extended by any half-decent programmer ( probably even you) and get the most out of the machine. And I can (and have, back in my undisciplined yout') mash up C to be the most unreadable mess you've ever seen (even worse than APL). Don't conflate the tool with the lack of skills of those wielding it.

        4. Roo
          Devil

          Re: C++ put me off programming

          "But it wasn't until I had to read someone else's C++ code that I realised what an horrendous mess there is to be made with perfectly good code, and how hard it can be to turn that back into something you can understand."

          The phenomenon also known as "You can write FORTRAN in any language"*.

          I should point out that while I don't have any affinity or much experience with FORTRAN, I recall thinking a few bits of F90 were neat when I was exposed to some FORTRAN written by reluctant programmers. :)

          It's possible to make a mess in any language. While you may argue that some languages make this less likely to happen, in my personal experience the major factors in the b0rk-level of some code as follows:

          1) Aptitude of the developers

          2) Level of dependency of dynamic linkage (the downsides are not unique to Windows)

          3) Platform

          4) Vintage of the code

          With respect to 2) I'd like to dump on over usage of dynamic linkage - with specific reference to Rabid Dependency Injection (I have seen DI work well, once, that was the only DI app I've worked on that was linked at build-time).

          1) RDI apps take significantly longer to start up (dynamic linkage is expensive folks however it's done).

          2) RDI apps usually suffer from narcolepsy (reminded me of good old garbage collection when ).

          3) RDI apps often crash due to failed linkage at run time (due to a missing DLL, or the wrong DLL, you have little chance of getting hold of the correct one as the end user of course).

          4) There is very little chance that the entire set of libs used by a RDI app when it was tested will be the same as the set that the user has available, rendering the testing null and void as far as the deployed app goes.

          5) As a developer working on an RDI app you will spend a large amount of time hunting for missing DLLs, which in many cases have not been checked in. In the worst cases, which are alarmingly common, the missing DLL won't be noticed for a long time because the dev box you are working on has about ten million versions of it that DLL littered through out it's path - OR (even worse) - the particular code path is hit very rarely - usually during the year end batch at 3AM local time (the guilty developer will of course be long gone, natch).

      5. CheesyTheClown
        Facepalm

        Re: C++ put me off programming

        I don't know... I am not a fan of virtual machines, but I adore JIT as a JIT if implemented correctly would do per processor optimization on the fly either at startup or after performing tracing. C++ is my baby, I grew up with it and have programmed it since I pirated my first copy of Glockenspeil C++ when I was 14. It is truly a thing of beauty.

        I however have begun investigating compiler and operating system design and development using C++ derivatives since C++ doesn't have enough ++ for me anymore. I hate the static architecture of ahead of time compiling. I don't believe good code can be produced anymore in the modern world of processors. There are exceptions. The x264 guys being the primary exception. But they code in C and blatantly force incompatibility with C++... Often out of their own interesting principles.

        I'll always love C++, but for now, I think JIT oriented languages are much better technically than C++.

    2. Tom 7

      Re: C++ put me off programming

      No - programming put you off programming. All C++ does is try to do it 'properly' from pretty much just above machine code to the top.

      Other languages to varying degrees do what MS does to IT in general - pretend its easy so they can sell it to you but when push comes to shove in the long run you have to re-thing and re-factor and re-write everything to fit in with the reality you hid from for years. To the point that many get stuck in, shall we call it the sme environment emphasis on the s), where you have made progress on the flat but not got any strength to climb the hills.

      Programming is NOT easy - its a mathematical mapping of almost all of reality onto a computer - bit of it can be easy but the end game is never simple. Computer SCIENCE is difficult in any language. MS Office gave you the excuse to write voluminous documents to hide behind - code itself cant do that. .

      Visual studio moving to C++11 might be portrayed as that excuse. But learn your trade and don't blame the language for containing concepts you haven't got a clue about yet.

      1. 1Rafayal

        Re: C++ put me off programming

        I actually agree with you, C++ does try to make you do it properly.

        I think the point you missed from the article and my original post was that uni lecturers dont try and teach you to do it properly.

        Quite often, they are fairly removed from the day to day business of writing code for money, either they have been in academia for their entire working life or they have quit development to become teachers (at least in my experience).

        There are some unis that do a fantastic job of teaching people how to write good code, regardless of the language used, within a context of real world applications.

        I strongly feel that the best way to put someone off being a developer is to choose a language like C++ as their first exposure to programming and then get taught how to use it ...

        1. M Gale

          Re: C++ put me off programming

          "I strongly feel that the best way to put someone off being a developer is to choose a language like C++ as their first exposure to programming and then get taught how to use it ..."

          Oh I don't know. Back when I was doing an initial Access to IT course, the tutor split the year into two classes. We both did VB and C++, however one group did VB first, the next group did C++ first.

          I was in the group that did C++ first. It was only a very basic course, didn't even go very far into things like pointers, however it did teach some of the basic principles of OOP. When it came time to switch to VB, everyone in the class had become so used to C++'s idiosyncracies that they took to VB's hand-holding-but-slow-as-treacle paradigm like a duck to water.

          The group that started with VB on the other hand, took one look at C++ and collectively shat their pants.

          Sometimes, just sometimes, learning by going to the deep end and throwing yourself in can be a good thing.

      2. Anonymous Coward
        Anonymous Coward

        Re: C++ put me off programming

        "All C++ does is try to do it 'properly' from pretty much just above machine code to the top."

        Ah, satire.

        "Programming is NOT easy "

        Well, not in C++ is isn't.

        "But learn your trade and don't blame the language for containing concepts you haven't got a clue about yet."

        Why are you not using assembler? Too lazy to learn the concepts, eh?

        1. Herbert Meyer
          Meh

          Re: C++ put me off programming

          Too lazy to learn the concepts ? No, too old to live long enough to finish the program.

        2. Ben Hanson 1

          Re: C++ put me off programming

          "Why are you not using assembler? Too lazy to learn the concepts, eh?"

          Everyone should spend some time coding in assembler. Maybe then pointers wouldn't seem so 'complicated'. But no, I wouldn't advocate writing in it for your entire career! ;-)

          1. cyborg
            Alien

            Re: C++ put me off programming

            I dunno... in some ways assembler can be easier than C++; well, at least it was back in the days of the Z80.

    3. Roger Greenwood
      Pint

      Re: C++ put me off programming

      I used Stroustrups book to write a very simple program in 1996, and we still use it today, unmodified. Has saved us many hundreds of hours of work over the years, and eliminated errors.

      Needs a kludge to get it to print from a win7 box, but hey ho.

      Long live C++ - thanks Bjarne.

      1. John Gamble
        Alert

        Re: C++ put me off programming

        I used Stroustrups book to write a very simple program in 1996, and we still use it today, unmodified.

        Okay, that startled me. I'm sure his writing has improved since then, but his first book was a miracle of obfuscation and a love of jargon. I suspect part of that may have stemmed from the fact that he wanted to show all the really cool stuff he'd created (multiple inheritance, for example, was not considered practical in a compiled language before C++; B.S. even said that he implemented it early because he was told he wouldn't be able to do it), but the end result was a book that was useless as a teaching tool and could only be used as a reference on a good day.

        It sounds like fifteen years of experience has given him some perspective though. I'll be interested to see what his next book is like.

    4. Anonymous Coward
      Happy

      Re: C++ put me off programming

      I was lucky - I learned to program just before C++ got crapped on the world.

      My, what a fantastically ugly programming language. I've had to learn it, I've used it. But please, dear gods, don't ever force me to return to it.

      1. DJ 2
        Thumb Down

        Re: C++ put me off programming

        I don't mind writing in C++ it can be elegant. But I never want to have to look at someone else's code again, especially if they are some sort of macro freak that macros the entire project into a single line, which expands to a page of macros which expands.. ALT+F4,

    5. Anonymous Coward
      Facepalm

      The joys of languages like C#

      I'm afraid you lost me there ...

    6. Jim 59

      Re: C++ put me off programming

      The order in which you encounter things is important. Knowing C before being exposed to C++ it a bonus because it some things, like pointers, are not so scary. Starting C++ without knowing C must be hell. Originally, I found learning C hard becuase pointers were an entirely new concept after doing only Basic and a bit of Pascal.

      The OO concept that came with C++ back in the 90s was blingingly elegant and exciting a the time. The hopes for widespread code re-use were never quite fulfilled, however. Perhaps because, as Lee Dowling says in here, the syntaxes required to describe and manage it are overly taxing.

      Today I would choose procedural for more trivial problems, OO for the more complicated, or at least the rather low-rent OO offered by Perl. IMO pointers are so central to high level languages thay should be taught from day 1, like variables.

      1. John Smith 19 Gold badge
        Unhappy

        Re: C++ put me off programming

        "Originally, I found learning C hard becuase pointers were an entirely new concept after doing only Basic and a bit of Pascal."

        Ironically full Pascal includes pointers (and even pointers to functions, just like C) but was not in TurboPascal before (IIRC) V5.0.

    7. Someone Else Silver badge
      Coat

      @1Rafayal -- Re: C++ put me off programming

      Microsoft will only support those parts of C++11 that meets it's goals for its variant of the language, or that are "easy"...and only when pushed real hard. Even now, they don't fully support C++98; why would you expect them to change now?

    8. Anonymous Coward
      Anonymous Coward

      Re: C++ put me off programming

      I know this sounds [insert favorite word for poser here], but C++ is the first language I learned - unless you consider DOS batch files a language. For me it was about being creative. I was 14 and wanted to make something. From what I remember, there was C and there was C++. Pascal was something else and the rest was historic. So I dug in and just used it. The funny thing is, in my carrier, I've written more code in other languages. I dare say that exposure to C++ as my first language may be the reason computer languages to not daunt me much. It's "If that what it takes approach", not a "But I can do it quicker in this language" approach. As I care about efficiency in all areas of life, I find myself going back to C and C++ recently for projects where I do have a say in the language as compared to all these new fangled languages that make it "easy" to write things.

      For example, I'm guessing the only reason we have RoR is because someone what to write a dynamic web page in Ruby. Is Perl really that horrible? Well, perhaps try writing it in C++. ;)

  2. mccp

    Sounds good

    I may even move away from C now that you can move a 10K x 10K array with two pointer assignments.

    Oh wait, I can already do that in C.

    1. JDX Gold badge

      Re: Sounds good

      You can do it in old C++ too. The point is YOU have to do it. Every time the developer is responsible for memory, an opportunity for an error is introduced.

      1. dave 100

        Re: Sounds good

        or you just used a smart pointer... not done c++ for a decade maybe that's out of vogue.

        1. JDX Gold badge

          Re: Sounds good

          >>or you just used a smart pointer

          smart pointers are officially part of C++ already. But if you want to transfer ownership of a chunk of memory from one object to another, you still have to do some mucking about - it's not simple reference counting as that achieves something different.

          How will this be achieved/implemented in the new version anyway, anyone got a code snippet?

      2. Anonymous Coward
        WTF?

        Re: Sounds good

        >Every time the developer is responsible for memory, an opportunity for an error is introduced.

        Evert time the developer is responsible for anything an opportunity is there. Until the day "programming" consists of asking the computer to do something for you then nothing will change. IMO memory handling is no harder - and conceptually a lot simpler - than plenty of other parts of modern development that language geeks rave about. Eg OO, generics etc.

    2. Phil O'Sophical Silver badge
      Coat

      Re: Sounds good

      > now that you can move a 10K x 10K array with two pointer assignments.

      Two? In ANSI BASIC you can just use _one_ assignment operator...

      1. Tim Parker

        @Phil O'Sophical Re: Sounds good

        "> now that you can move a 10K x 10K array with two pointer assignments.

        Two? In ANSI BASIC you can just use _one_ assignment operator..."

        One ? That sounds like aliasing rather than moving to me....

Page:

This topic is closed for new posts.

Other stories you might like