Why do C++ folks make things so complicated?

This morning Miroslav Bajtoš asked “Why do C++ folks make things so complicated?” in response to my article on regular expressions in C++. Other people asked similar questions yesterday.

My response has two parts:

  1. Why I believe C++ libraries are often complicated.
  2. Why I don’t think it has to be that way.

Why would someone be using C++ in the first place? Most likely because they need performance or fine-grained control that they cannot get somewhere else. A Ruby programmer, for example, can make a design decision that makes code 10% slower but much easier to use. “Hey, if you want the best performance possible, why are you using Ruby? Didn’t you come here because you wanted convenience?” But the C++ programmer can’t say that. It’s not turtles all the way down. Often C++ is the last human-generated language in a technology stack before you hit metal.

This weekend The Register quoted Herb Sutter saying “The world is built on C++.” The article goes on to mention some of the foundational software written in C++.

Apple’s Mac OS X, Adobe Illustrator, Facebook, Google’s Chrome browser, the Apache MapReduce clustered data-processing architecture, Microsoft Windows 7 and Internet Explorer, Firefox, and MySQL—to name just a handful— are written in part or in their entirety with C++.

Certainly there is a lot of software implemented in higher-level languages, but those high-level languages are almost always implemented in C or C++. When there’s no lower-level language to appeal to, you have to offer a lot of options, even if 90% of users won’t need those options.

On the other hand, that doesn’t mean all C++ libraries have to be complicated. The argument above says that the lowest layers have to be complicated and they’re written in C++. But why couldn’t the next layer up also be written in C++?

Some time in the 90’s I ran across an article called “Top C++.” I’ve tried unsuccessfully since then to find a copy of  it. As I recall, the article proposed dividing C++ conceptually into two languages: Top C++ and Bottom C++. Explicit memory management, for example, would be in Bottom C++. Top C++ would be a higher-level language. You could, for example, tell a compiler that you intend to write Top C++ and it could warn you if you use features designated as Bottom C++.

Of course you could slip from Top C++ into Bottom C++ if you really needed to, and that’s the beauty of using one language for high-level and low-level code. Application code in C++ would use Top C++ features by default, but could deliberately drop down a level when necessary. A section of Bottom C++ could be marked with comments or compiler pragmas and justified in a code review. Instead of having to cross a language barrier, you simply cross a convention barrier.

I thought this was a great idea. I’ve followed this approach throughout my career, writing high-level C++ on top of low-level C++ libraries. To some extent I put on my Bottom C++ hat when I’m writing library code and my Top C++ hat when I’m writing applications.

But most of the world has decided that’s not the way to go. If you’re writing C++, it might as well be Bottom C++. Instead of Top C++, write VB or some other higher-level language. There’s very little interest in high-level C++.

I imagine this decision has more to do with management than technology. It’s easier to have people either write C++ or not. If you’re writing C++, then use any language feature any time. I suppose this is a stable equilibrium and that the Top/Bottom C++ partition is not.

More programming posts

125 thoughts on “Why do C++ folks make things so complicated?

  1. The lowest level isn’t C++, it’s C. No, it’s assembly. If you want to go balls to the wall hard metal, you’re not screwing around in C++, you’re flying nap-of-the-earth where every instruction matters and a subroutine call is too much overhead (or at least you need to know when it’s too much overhead).

    If you think C++ is “low level”, you don’t know where “low level” is.

  2. Resuna: C++ isn’t the lowest possible level of abstraction, but it is the lowest level that many people consider.

    One man’s floor is another man’s ceiling, but more people think of C++ as a floor than think of it as a ceiling.

  3. I’ve been coding for since i was 13, at that time i found C++ extremely confusing and hard … just to look a hello world with win32 api i was like O.o WTF??

    I fully started programming with php with simple web stuff my first windows app was in Delphi and i loved it, never made anything big tho but it was “easy”, i had peaks at Java and C# but the idea of not able to compile native code bothered me so never went fully into it .. perhaps Delphi was awesome.

    Few years ago an urge to make video games push me into C++ and men it change my life it was hard at first (now i can’t program in anything than C/C++) … but once you know what can you do in C/C++ not only in high-level but also in low level and to really understand what the machine does, something that you’ll never learn in other language it’s worth the learning curve.

    Dont mention that C has the biggest library and also C++ too libraries like boost, Poco, wxWidgets for example, usually people dont like C++ because they feel like reinventing the wheel every time… You dont have to…. i have personal classes and libraries to use .. is part of programming

    I Myself reinvented the wheel many times for the sake of learning, for example my own portable graphic engine with directx/opengl. But right now i would use OGRE instead to reduce in 80% developing time.

    Looking forward for C++0x

  4. Kurt Guntheroth

    I believe it was C.A.R.Hoare who said, sometime in the ’60’s, “If you could design a programming language that let you express you thoughts in simple, clear English, you would discover that programmers can’t speak simple, clear English.” It’s true. There are many programmers, and very few good programmers. In the hands of a good programmer, C++ code can be beautiful, expressive, easy to follow, and efficient. In the hands of a bad programmer, well, lets just not go there. Most programmers would drop into bottom C++ when they didn’t need to. Like they do now.

  5. Oh, forgot to add.
    I have a friend in masters which programs only on MIPS assembly and ocasionally C, BTW, thats REAL low level. He’s kinda old (45+) and I’m young (22), it’s really to cool to have a different view.

    The thing that I discuss with him, and he agrees, is that IMO C++ don’t know where it went, it’s not too low neither too high level. So you have to write your memory management, data structure and so on.

    The thing is that if you use a higher level language you will probably get a faster run because these companies usually have the best language designers (Sun, Microsoft) so they use not only very high efficient data structure and operations but also heuristic in the program translation to binary code.

  6. >> Why do C++ folks make things so complicated?

    Ah, that’s an easy question to answer. Here I will do it with one hand tied behind my back whilst standing on my head in a pool of mud wrestling hotties.

    Look at how simple autoptr is to use to leverages stack semantics then look at what you must do in C# to accomplish deterministic destruction. Then run to the nearest .NET evangelist to ask “Why do .NET folks make things so complicated?”

    Ignoring the obvious problem for that group of developers that can only write C++ code if your primary requirement is to leak memory, for every complicated thing in C++ you will find 2 or 3 in .NET. Well, perhaps you won’t but I certainly did. Same thing with Java.

    Just wait, the future language on iOS, everything Google, and Windows 8 is going to be, you guessed it, JAVASCRIPT!!!! WOOH HOOO. Yes, javascript, invented by Wimpy the code and fix programmer. “I will gladly pay you tuesday (and every day after that) to fix the software I paid you to write today. Actually we don’t care if the web site ever works right because we don’t have to use it hahahaha. Now go snow boarding we’ll see you whenever.”

    Here’s a stock tip for you, invest in all the companies that have decent bug tracking products.

    gday mates!

  7. There is one thing which is conceptually broken with C++ and I am surprised it hasn’t been mentioned yet: The complicated and inflexible standardization process. IMHO this might kill the language one day. Consider that it took 15 years to update the last released standard with many, many important things left out because of “lack of time” (hell, it’s been 15 years!)…

  8. Achilleas Margaritis

    I think the discussion would be much more productive if we focused on specific things C++ makes complicated. There is a lot of conjecture in this article and posts, so a much better approach would be to post specific examples of C++ being complicated vs other languages that are not complicated.

    Personally, I believe that C++ has a reputation of being complex, without actually being so, but perhaps I am wrong.

    Nevertheless, without examples, the conjecture that C++ folks make things complicated cannot be proven.

  9. One of the most important but to my knowledge seldom mentioned differences is that Java and C# differentiate between value and reference types. This distinction makes it easier for the beginner but imposes strong limitations and leads to unnecessary pointer indirections and boxing/unboxing. Why can value types not be referenced? I think it was just to help garbage collection.
    I prefer languages without GC because they urge you to think about resource management what generally improves code quality. Furthermore GC relies on heuristics and blocks your applications during parts of the GC process. A high quality application cannot be built on such a platform. Also look at dependencies introduced by Java and C# platforms.

  10. My opinion is that dividing a powerful language in “Top” and “Bottom” versions has more to do with the ability of the developer to work on multiple abstraction levels at the same time than everything else.
    Experienced programmers know when the top and bottom levels are needed during the construction of a software, so it’s natural they prefer a language that better suits to their mental processes.

  11. “complicated” is a relative term. some would respond: “because we can”.
    maybe C and C++ require more skill, intelligence, and require a deeper understanding. C and C++ developers are software engineers — that’s why the term “developer” or “programmer” is used to describe the others.

  12. I programmed in C++ and I had two main problems:

    1) Not an standard library similar to python batteries and not an standard GUI/WEB libraries.

    2) Interaction between C++ and C libraries. Most of the code C++ is dedicated to data type transfomations.

    Mobile devices could be a new opportunity to increment the use of C++, but without good “C++ libraries” …

  13. C++ is power language and it is fitable the large scole softwear , such as NASA project , and it is stable enough , C is too bottom , and it is focus in slip level , that is all

  14. Complex is relative. I disagree that software engineers use C++ while developers use C#. When I want to engineer a system, I would rather spend more time designing and engineering the system rather than farting with the tooling. C++ makes me fart around with tooling more leaving me less time to thing about actual system engineering and design.

    Languages such as C# and java make programming in C++ seem more complicated. For example, simply iterating over a collection in C++ requires mind numbing syntax. Yes, C++ gives one more control and in certain applications, better performance but this does not have to come at the cost of verbosity, ugliness of syntax and useless header files. Cleaning up the syntax and getting rid of those useless header files would go a long way towards modernizing this language. Good tools do not have to be ugly and complicated to use.

  15. I am not able to give strong technical motivations, but I believe C++ could have been better, but indeed became an ugly, “unusefully” complex language (yet powerful, ok, but replaceable). I prefer Objective-C, or C alone; and I suppose hybrid solutions (C for the hard part and another high level language for the rest) can kill the need for C++ “performance”.

  16. @ Mikhail “To my surprise, the C# code was more efficient”, really? Well then either the library you used in C++ is horribly inefficient, or you’re doing something wrong, because I don’t believe that for a second. I had fun writing a C++ multi-threaded load balancing server that could handle 512 clients (I’ll be reprogramming it so it can handle thousands), and it barely used much of the computers available processing power handling the spamming of all 512 clients 30 times a second, both sending and receiving data from all of them, and this was with sockets configured in a TCP connection.

    Still eager to read that Top C++ article. *continues reading through the comments*

  17. @Brian

    Yeah don’t believe it. It’s more VB (Very Bad) nonsense. There is an MSN article from several years back like before the release of .NET 3 that was at least partially about the compilers and teams writing them. They stated in no uncertain terms that using C++/CLI would produce the most efficient .NET applications, period.

    Not every developer that learned on a high level language is the same to be sure. That said, the vast majority of them have no understanding of the foundation they work with, of computers and software. Therefore much of what they do all day every day is make assumptions. They have to because they just don’t have the knowledge to do otherwise. So mostly you don’t want to believe anything they say.

  18. I had to chime in on this one. I see people mentioning C# as “Top C++”, but think about that for one second. If we had “top” and “bottom” C++, we could easily make the code work in Windows, Linux, Mac, and whatever else. C# is a Windows-only language developed by Microsoft, unless I am mistaken. Currently I write C++ code that compiles under both Debian GNU/Linux and Win32/Win64. C# cannot do that. To me, this means that C# is not a “top” C++, since C++ itself runs on about every platform out there, and C# only runs on one.

    Also, as has been stated, C# is much less efficient than C++. Heck, most languages are slower, bulkier, and/or less efficient than C++, the exception being ASM. If we did divide C++ into a “top” and “bottom”, the top shouldn’t be slower than the bottom. That’s my belief, anyway.

    Finally, I don’t see the need to divide C++ up, since it will further complicate the language for people new to OO or the language in general. Besides, we as programmers normally write our own libraries for use in our applications to do these high-level things with ease, and we learn from doing so. For example, in C++ under Windows or Linux, we have no direct way to create a window object, call a “create” method and have a window. We have to register classes, set all kinds of stuff, then create the window. I wrote a OO library for doing just that so that my code would work under both Windows and Linux and I have about five or six lines of code as opposed to over a hundred in Windows. I could have used C#, but my code is much faster than .NET, and it is cross-platform. Now if we had to worry about a top and bottom, this would be more difficult because I do use what would be considered “bottom” classes and functions in my library. That’s just more of a pain for me. I say leave it alone.

  19. Sephiroth: C# runs on multiple platforms via the open source Mono project. I believe Ubuntu ships with several applications that are written in C#.

    In my experience, C# runs approximately as fast as C++, within a few percent. Of course it matters what task you’re doing, and you can find benchmarks where either language is faster. I consider several factors when deciding whether to use C++ or C# on a project — what code if any I need to integrate with, what dependencies I’m willing or unwilling to take, the availability of libraries to do what I need to do, etc. But performance is not something I worry about.

    I have seen C# WinForms applications that are slower than comparable C++ MFC applications, especially to load, but I suspect much of that difference is WinForms vs MFC rather than C# vs C++.

  20. I’ve been writing in C since 1987 and C++ since 1991. Call into my well documented APIs from whatever language you use, its just as easy as any other functionality. Don’t ask me how it works. If you are a C++ programmer I don’t need to tell you, you can just read it. If you’re confused you need to think about that. I have taught 10 years olds to program, so I don’t have a communication problem.

    The cpus have gotten so fast that the advantage of bare metal programming is outweighed by the portability & ease of RAD glue languages on top of the interpreter… which is written in C++. IMO multithreaded support was the last obstacle because the hardware just keeps getting better. Use the languages that best fit your needs, eets all de same. But if you have room for only one language, C or C++ can do everything.

    You people making this a semantic debate or classifying Java etc. as ‘Top C’, you’re already confused. You don’t need my help.

  21. Josh Reuben 06.14.11 at 06:42 said:

    “Top C++ has been arround for 10 years – its called C#”

    Well Josh, sorry to have to correct you but C# is not C++. First of all, C# is a Microsoft creation that can only be used in Windows (rather limiting to have a language that can only be used on a single platform), whereas C++ can be used on and ported to a wide number of platforms. Next C# and C++ do not share the exact same syntax and rules – so there is no way that one can call them both the same language or even different versions of the same language. Based on your statement I assume you are a Windows programmer – if, like myself, you had developed for dozens of different platforms and processors in a variety of different languages including C++ you probably would not have made such a statement.

  22. C++ is not overly complicated. The problem is that too many people try to become programmers when they simply aren’t cut out to be one. Software development is a very complex business, not only do you need the right tool for the job but you need the right people as well. Too often this industry has tried to come up with “easy” languages so that just about anyone can write programs – this is a huge mistake. Programming a complex machine by nature is complex – programming in a “dumbed down” language such as Java or C# introduces a whole set of undesirable issues v.s. programming in a full-powered language like C++. My honest opinion after 40 years of programming is that we need to identify and train the right people (those who have natural talent) to develop software – not create yet another “dumbed down” language so that we can press the wrong people into service as programmers.

  23. I programmed a bit in BASIC in the ’70’s and FORTRAN in the ’80’s. For a quarter century, I coded APL for food (can’t get further from the machine layer than that). For the last decade and a bit, I’ve written Java and JavaScript. For a couple of years, I’ve fiddled with PHP.

    I’ve never been more than the greenest tyro in the land of C/C++. I’d done some small things in C during the mid-90’s. I bought the Visual IDE for C++ in the late ’90’s, learned the basics, and promptly put it on the shelf, since I had an APL alternative for Win32 development (didn’t hate the language – despised the IDE). However, I suggest that your thesis question, “Why do C++ folks make things so complicated,” might better be recast as “Why do {fill-in-reader’s-favorite-language} folks make things so complicated?” My answer to the question is lack of sophistication about each language in particular and programming principles in general.

    The world is programmed in large part by relatively untrained or inexperienced folks. You mention both FP and OOP in the same article, and procedural methods are presumed. How many programmers do you know that have worked in all of those? The overwhelming majority of those with whom I’ve worked know *A* paradigm, many *A* language. The ability to pick the right “weight” of programming model and tools best to suit the task or sub-task arises in exceptional people or regular people exposed to exceptional training or the experience of l-o-n-g years. Elegance is a virtue of the expert. Hence, I contend that “complicated” code is most often more correctly termed “needlessly complicated.” I freely admit there are instances that complicated code is required due to the nature of the underlying machine processes mapped by the code…just not so often as is seen.

    You concluded…”I imagine this decision has more to do with management than technology. It’s easier to have people either write C++ or not.” This is a disturbingly (but unfortunately for some of us not surprisingly) correct interpretation, I suspect. Consider your motivations. You intend to partition the task universe into two major subsets:

    – aspects “near” the problem-space layer that need have little regard for machine architectures, i.e., stuff that is close to the human levels of formulation;

    – facets that require explicit consideration of underlying implementations of hardware interactions.

    Your own sophistication stands above the level of the novice or even journeyman programmer. The majority of developers fail to meet that standard, and managers know it. It’s easier and cheaper, management-wise, to enforce that all programmers subscribe to a similar, more mundane level of skill, than attempt widely to cultivate great sophistication. Not all programmers are capable of gaining profound expertise. Most, who can attain the greater standing, require lengthy, expensive training. The few, who can rapidly evolve, are often (those pesky) “quirky genius” types, who are expensive to acquire and “difficult” to manage. Superior, from the manager’s perspective, is to shepherd the production of less good (frequently pointlessly complicated) code that remains consistently within the bounds of understanding of the majority of a less gifted flock. This state is further promoted by the ever-improving capacity of hardware and decreasing cost of it. I think this an ignorant perspective by managers, since less good, especially needlessly complicated, code is hugely expensive to maintain at the currently most cost-intensive level, i.e., programmers’ billable hours, but how truly expert are the bulk of managers?

    In response to the title “Why,” I conclude that C++ programmers are just like their counterparts in all other languages, in largest part, inadequately expert and sub-optimally motivated by their managers to change that state.

    (some other Richard)

  24. I found this article interesting because Borland had achieved this with Delphi. You could use it as a low level language OR a RAD.

    I have discussed the advantages of working in a language which allow you to do both “top” and “bottom” with multiple C++ programmers and when I show them examples their eyebrows dance.

    Incidentally C# is based on Delphi (in fact has the same developer). There have been multiple comments saying that C# is top and C++ is bottom but people have pointed out they are not the same language in Delphi it was.

  25. Everyone who doesn’t understand C++ versus C (and this included me six months ago) should start by reading comment #10 from gappy.

    Today, C++ is the language of choice for optimization, not plain old C. The reason it’s so efficient is twofold. First, C++, like C, is intrinsically stingy with memory (unlike Java objects, a basic C or C++ struct has no overhead if there are no virtual functions). Smaller things run faster due to caching, and are also more scalable.

    What makes C++ both hard to debug and understand and even more efficient than C is the use of template metaprogramming. In particular, there’s huge gains to be made with the kind of lazy evaluation you can implement with <a href="expression templates and the kind of memory and indirection savings you get by avoiding virtual functions with the curiously recurring template pattern.

    I just visited Google NY lat week, where many of my old friends from my speech recognition days work. Upon moving to Google, they reimplemented their (publicly available) finite state transducer library in C++ using expression templates (the OpenFST project).

    You’ll also see expression templates with the curious recurrence in the efficient matrix libraries from Boost (BLAS level only) and Eigen (also provides linear algebra). They use templates to avoid creating intermediate objects for transposes or scalar-matrix products, just like a good Fortran compiler.

    Templates are also hugely expressive. They lead to particularly neat implementations of techniques like automatic differentiation. This is what roused me from my life of Java and got me into C++ (I was a straight-up C programmer when I did speech recognizer coding ten years ago).

    What’s really neat is that there are now stochastic optimizers for C++ that can analyze your actual run-time performance. I really really really like that feature of the Java server compilers. Haven’t tried it in C++ yet.

  26. Anyone mentioned c++/cli? It is the “Top C++” in the MS world. It can mix and match .NET code and native c++ in same source file (and therefore even plain C). Yes it has a pragma for that. So yes that article come true.

  27. Klaus – I agree with you wholeheartedly, C++ isn’t necessarily bad, but the syntax is uuugly! In my opinion, this stems from the desire to be C-compatible (header files) and to keep compatibility with earlier revisions of C++ (the whole ‘iterating over a collection’ is just bolted on while trying not to change the core language syntax).

    You might be interested in checking out the D language (by Digital Mars company). Its very interesting how that language, while being mostly C-compatible gets rid of many of the shortcomings of C++ and introduces an elegant syntax for things that look just gruesome in C++. Granted, D has its share of problems, mainly lack of support from any of the big players – hence lack of a good IDE. Probably not very usable in a production environment, but shows what C++ could have been.

  28. Kurt Guntheroth

    If C++ didn’t have to be compatible with C, it might have had a more elegant syntax. And be relegated to the dustbin of history. Accepting C programs was a major strength for C++ for 20 years.

    I can’t imagine what the issue is with iterating over a collection. It’s a triumph that the STL works like a simple for loop in C.

    D is an uncoordinated hodgepodge of new ideas tossed in on top of C++ syntax. If you dislike C++, it’s hard to understand why you find D an improvement. People don’t seem to understand that one of C++’s strengths is a relatively fixed core language, with new features added in as libraries.

    Guess we all have our own tastes, huh?

  29. Bottom C++ : I call this C.
    A big problem with C++ libraries is that not all compilers/linkers are compatible : there are issues with name mangling, static initialization and maybe some other things. Linking a library compiled with C++A with a program compiled with C++B may fail. There is no such problem with C.

  30. The top / bottom thing sounds a lot like the D programming language, at least manual memory management versus garbage collection comes to mind.

  31. Herb Sutter says “The world is built on C++.”. Bless….. Herb is just so young and impressionable. He doesn’t realise that the world is run on COBOL. Grace knew her stuff……

  32. Top C++ is for people who want to be lazy. Real programmers use C and C++ because it lets them control and manage everything. You don’t have to rely on some bloated framework (IE .NET) to quadruple your .exe size just so you can have a pretty GUI. Suck it up people and learn how to be a real programmer. Pointers, linked list, and things like operator overloading aren’t that hard. It just takes a little practice and some time using that gray matter behind your eyes.

  33. David Lee – real programmers just assembly. Or, better yet, they write machine code directly. Why use all these libraries and stuff, they just add bloat.

    Surely you don’t need all that bloat and can never make a mistake.
    You never have to meet deadlines and have all the time in the world to debug your code as long as it takes.

    But seriously, take a look at this
    http://www.viva64.com/en/b/0116/
    ” All the programmers make silly mistakes” – yes they do. I do. Everybody does, and C++ is a lousy safety net.

  34. Why make life so incredibly difficult and complicated? IMHO, today, C++ is perhaps OK for system software at the bottom layers.. find it too dangerous pointers etc. Don’t want to write end user apps with C C++. Using such a low level language I even have to specify datatypes like int and so on. What you are actually doing when programming in C++ is continuously specifying all kinds of details like datatypes etc. even pointers, because the primitive compilers can’t figure it out themselves.. sheesh, that should be a thing of the past by now. too unreliable. Why don’t you try Smalltalk? Pure OOP. no pointers, no datatypes, just classes. You could download e.g. Pharo Smalltalk or for web apps look at Seaside.st. It might come as a culture shock to you, a real pure OOP (instead of C++ which is not a pure OOP Language) Cut development times to 25%. there’s no compilation. I admit, programs run not that fast as in C/C++ With todays advanced Smalltalk VMs performance is comparable to Java. Smalltalk for most applications is fast enough now. Me (61 btw) have been waiting a very long time for this to happen, because machines were too slow fro Smalltalk say, until 5 years ago. That is why we had to use primitive languages like C++, because you had to specify all kinds of detailed info to the compiler. Yes indeed, programming languages like (not only) C++ from the previous century where complicated and unreliable. Drop them whenever you can. A warning though. don’t stay longer than a few days in Smalltalk, because you might not want to get back to C++ after that. Free yourself. Regards

  35. Ok , I’ve got to throw this in — hope its not seen as too much of a side winder though :)

    Many times I have been tempted to dive right in and finally learn C++ but all that you, and others, point out holds me back…

    Now that there is a proper introductory book out for it (at very bottom here) … I’d have to suggest that there has long been something around that provides both the fine grained control, when it is needed—right down to being able to accommodate machine code if you will, C code modules, and all the while presenting at a much higher level for normal tasks.

    And it is much more humanly friendly, an elegant language in fact! (Of course some one will say that beauty is in the eye of the beholder :)

    Its cross platform in the extreme, able to even cross compile. Has a long history and a fine User base. It has a commercial cousin, but there exists an open source project — the venerable Freepascal, with an IDE for command-line tools, and the Lazarus IDE fro consloe and GUI applications.

    “Free Pascal (aka FPK Pascal) is a 32 and 64 bit professional Pascal compiler. It is available for different processors: Intel x86, Amd64/x86_64, PowerPC, PowerPC64, Sparc, ARM. The discontinued 1.0 version also supports the Motorola 680×0. The following operating systems are supported: Linux, FreeBSD, Haiku, Mac OS X/Darwin, DOS, Win32, Win64, WinCE, OS/2, Netware (libc and classic) and MorphOS.”

    ” The FPC backend for the Java Virtual Machine (JVM) generates Java byte code that conforms to the specifications of the JDK 1.5 (and later). While not all FPC language features work when targeting the JVM, most do and we have done our best to introduce as few differences as possible.” and much more…

    Some current Links…
    Aim at this release perhaps :
    http://www.pilotlogic.com/sitejoom/index.php/codetyphon

    But look back to here :
    http://freepascal.org/
    Lazarus IDE : http://lazarus.freepascal.org/

    Lazarus Documentation : http://wiki.lazarus.freepascal.org/Lazarus_Documentation

    Free Pascal Documentation : ftp://ftp.freepascal.org/pub/fpc/docs-pdf/
    and more…

    New book (60 euro deal now on) bottom right of page: http://www.blaisepascal.eu/index.php?actie=./subscribers/subscription_mainpageUKBookDepartment

  36. Ted – Pascal isn’t an alternative to C++, it’s an alternative to C.

    I used to be a big Pascal booster, back around 1978. After actually working on a variety of Pascal implementations it became clear to me that the language was not designed for software development. Don’t get me wrong, it was a fine teaching language, but writing portable Pascal code was impossible: I used Wirth’s Pascal, UCSD Pascal, Berkeley Pascal, and UCSD Pascal, and even with the simpler language of the time portable Pascal was an oxymoron.

    I had hopes for Modula and Modula-2, but they had the same problems. Modula was a much better language than Pascal, but instead of having an underspecified language with and overspecified I/O library that encouraged extensions, Modula’s I/O library was so underspecified it was a pain writing code that would compile clean in two versions of Modula on the same OS.

    Fool me twice, shame on me It’s not Wirth my time poking my nose in that trap again.

  37. Find it a bit nonsense discussing about the speed of a highlevel language. Its ONLY for the programmers comfort! (all C* are NOT comfortalble – too much special characters). If you want to be speedy – use assembler! ( I used to be a mainframe IBM system programmer, struggling for every instruction). Now on PCs does it really matter to fight for microseconds?
    But – thanks for the Discussion.

  38. Never has one article generated so much whining from C++ -haters. All I can say is, “It is a poor workman who blames his tools.”
    C != C++
    C++ != poorly written library X
    C++ is a powerful but complex tool that is difficult for the inexperienced coder to wield competently. Particularly, if you don’t believe in object-oriented programming, you have no business writing in C++. It is easier to find a stupid way to misuse the advanced tools in C++ than it is to abuse the simple palette of tools in [old programming language X]. If you don’t want to invest the time needed to master these tools, you should write in [old programming language X]. If you don’t have time to build your code carefully, you should write in [modern programming language Y] instead.
    In the hands of an experienced, competent developer with adequate time for design and testing, C++ is extremely expressive, fast, and elegant. That is why the world is built on C++.
    The problem is finding experienced, competent developers. There aren’t many, and some who style themselves experienced and competent are not actually capable of doing good work, or are no longer interested in learning to improve their craft.
    Managers would do well to limit the use of C++ by the inexperienced and the less-competent. Perhaps a focus on software review early in the project could lead the wily manager to reassign resources not capable of doing good work in C++.

  39. (@ Peter: i didn write anything about Pascal, Paul did :o)
    @SeattleC++:

    I don’t hate C++ or any other programming language. Why should i? Most of these IT tools are made with years of hard work and effort, so one should respect the makers/inventors of these tools and see these tools in the concept of time when they were created. I know as well that C++ (or C) is still the base of a lot of software. One of my systems OS is Debian Linux, most of it is written in C or C++. Before C++. All very nice and functioning very well. I’ve spend many years with several programming languages (see my resume , written in Pharo Smalltalk and Seaside.st) and use whichever language the customers prefer (and am I in control of) But when writing (end-user) applications, I want little involvement with the underlying system and as much of these nitty gritty details being solved by the interpreter (jikes! an interpreter, isn’t that slow, you might think…no mind, it sort of “precompiles” each method when saving it). This way i can develop faster. That’s why I prefer Smalltalk. Of course Smalltalk has a learning curve. But i think it takes a lot longer to learn C++. Compared to Smalltalk, C and C++ are “closer to the machine” and, from the perspective of an “application” programmer, like I am. Thanks, for reading.. I will not bring this under your intention again :o)
    links: seaside.st, pharo-project.org, squeak.org.

  40. C++ programmers think different. No matter how close to the metal you want to think, you’re still a few abstraction layers higher than C++ programmers. Hence, what’s simple for them is complicated for you. C++ libs that are complicated for you are simple for C++ programmers.

  41. Peter da Silva — “1978” … check out the modern things that have happened :)
    Jordi Steffen — “(all C* are NOT comfortalble – too much special characters” that’s what attracts me to more humanly elegant things like Object Pascal.
    If you write direct Object Pascal you can get size right down, and speed is right up there.

    Paul

  42. Paul Norman
    I started with Wirths Pascal (I am from Zürich!), then later on Borland, and now I’m a fan of FreePascal. Also some OO but dont like this too much….

  43. Early in C++’s existence, C++ took a lot of crap from C programmers regarding performance. In those days, C programmers complained of the “overhead” of virtual function calls… and the “bloat” of objects.. As a result, the C++ community became super focused on performance… Most of the features in C++ are completely opt in (I.E, if virtual functions are too expensive, you are free to not use them and not pay any penalty)… This attitude bled into the STL…

    Another factor that complicates the STL is it’s approach to generic programming… In my opinion C++ took the purists approach (instead of the pragmatic one)… So, std::list doesn’t have a .sort() method… Instead, you can use the sort algorithm on any container that implements the right kind of iterators…

    IMHO, C++ needs 2 standard libraries… One for purists, and one for pragmatists… (and the pragmatists will use the STL to implement their standard library, but the pragmatist::list will definitely just have a .sort() method!)…

Comments are closed.