Software Development

The current state and future of C++

Justin James responds to reader's question about the state of C++ and how it fits into the .NET universe, Web development, and cloud computing. Find out why he thinks there is still great potential for C++ developers to do quite nicely for themselves.

 

TechRepublic member Oleg F (an experienced C++ developer) asked for my thoughts on the "present and future" of C++. In addition, he wanted information on how C++ fits into the .NET universe, Web development, and cloud computing. Below is my response.

I believe the days of C++ as a general purpose programming language are quickly ending for most developers. There are still lots of great uses for C++, particularly for OS-level work, low-level work (embedded devices, device drivers, etc.), certain high-performance applications, and applications where the overhead of a system like .NET or Java would be too heavy (like an office suite). Some developers will continue to use C++ for applications that other, less complex languages can handle as well. But for the typical developer, C++ is a big headache for minimal gain.

The performance issues that most developers face are not the kinds of issues that moving to native code will resolve; once you take performance out of the equation, C++ is a fairly unattractive option for application development in most cases.

The handful of C++ developers that I've talked to say using C++ in the .NET managed environment is not particularly attractive to them; this takes away much of the opportunity to use it in a Web development capacity, unless you want to use it in the CGI model. There are good things about CGI (less overhead, simple conceptual model) and bad things about CGI (your application has to be "aware" of many more low-level tasks). From what I've heard, under the .NET CLR, C++ loses its speed, as well as many of the things that make C++ useful.

This is not to say that C++ is going away any time soon. I see C++ joining the ranks of COBOL and FORTRAN as a legacy language with a massive installation base and a need for people to maintain/extend existing applications for more than 50 years. In addition, a number of new development projects will be started in it for a variety of reasons (familiarity, library support, tradition/habit, cultural, etc.). I also suspect that it will pick up a reputation as a "dead" language (again, like COBOL), due more to a lack of buzz and hype than actual non-usage (also like COBOL).

I don't want to make the future for C++ sound dismal; if anything, I think there is great potential for C++ developers to do quite nicely for themselves. If you're a C++ developer, I suggest that you stick with the language. Are the things you're working on flashy or get the same attention as Web applications in the mainstream publications? No. But with the current salary structures, I feel that experienced C++ developers will see very nice paychecks for some time. In addition, as the remaining C++ work is of higher difficulty and fewer people learn C++ (it isn't taught as frequently in colleges these days), I expect C++ developers to have more job security and better compensation than .NET or Java developers over the long run.

While C++ in Web development is not likely to become mainstream any time soon and desktop application development in C++ becomes less common, I think there is a lot of upside opportunity for C++ in certain aspects of cloud computing. For some projects (think of ones that are well suited to supercomputers), the cloud offers C++ developers a way to get the same benefits of grid computing but with much more flexibility. There is a lot of overlap between those projects and the kinds of projects for which developers regularly use C++. As a result, I think cloud computing will replace or supplement grids and supercomputers in many projects and will provide an excellent opportunity to see C++ used in new and innovative ways.

Keep in mind that much of this analysis is focused on the Windows world. From what I see, the *Nix development community is still very C/C++ oriented. C++ developers who are concerned about dwindling opportunities in Windows should definitely take a look at *Nix development.

I believe that C++ will slowly fade into the background, but it will neither die nor will it ever become unimportant. While most developers I know have never touched C++ in a real-world environment, many developers would benefit from learning it, if only to gain some appreciation of various languages, including Java, .NET, and Ruby.

If you have a programming question, e-mail it to me by clicking the Contact link at the top of the Programming and Development blog header.

J.Ja

Disclosure of Justin's industry affiliations: Justin James has a working arrangement with Microsoft to write an article for MSDN Magazine. He also has a contract with Spiceworks to write product buying guides.

---------------------------------------------------------------------------------------

Get weekly development tips in your inbox Keep your developer skills sharp by signing up for TechRepublic's free Web Developer newsletter, delivered each Tuesday. Automatically subscribe today!

About

Justin James is the Lead Architect for Conigent.

181 comments
maximatt
maximatt

Long live to C and C++!!!

yhalhtet
yhalhtet

Well my opinion is you are now targetting for web developing, am i right? If you are talking about web true, C++ is not needed to study, but for the Operating system and other for eg. Games development, what do you think? Because one of the C++ power is user interface. You can write OS with C++ for UI. And the game production also we need to use C++, all the marketed games are written with C++. All the languages have own pros and cons. Then can you write the good PC game with java or .net?? J2ME, J2EE, and J2SE they have their own pros. .net and c# also have their network software production. Well, this is my opinion only :)

jlanus
jlanus

here at Globant, in Argentina, C++ programmers are seeked mainly for game development. I think that the gaming industry is a huge niche for C++ developers.

LarryD4
LarryD4

I know this thread consists of business side developers, but C/C++ is alive and well in the 7 billion dollar gaming industry.

Ozolins
Ozolins

There is nothing simpler and more efficient than using an editor by Scintilla and Watcom open source. It is even easier to work with than the classic and robust Borland TurboC++. A lot of old miniprograms can be easily ported and with href icons possibly replacing text scoping strings in the source, it may become highly readable.

fewiii
fewiii

But I don't mind not being "cool" (all the time)!

mckameh1
mckameh1

The alternatives mentioned, Java, .NET, and Ruby, aren't perfect either. They are all closed environments that don't interface easily with others. In addition, they require installations of runtime environments and suffer from "version-hell" - not all compiled programs will work with all runtime versions. The only environment that is universally inter-operable and almost always guaranteed to work is actually C/C++. In any case, as programming languages, all these environments are more or less equal in capacity and the differences in syntax are more cosmetic than fundamental, or pertain to very specific areas. So, no, I don't see C/C++ as disappearing in the foreseeable future.

Saurondor
Saurondor

To be honest its been a while since I've done some C on the desktop. Heck I haven't even done assembler for the x86. That aside I have quite a bit of experience developing PCBs around 8051, AVR, Atmel and Rabbit micro-controllers. I can tell you C is doing very well there. Although it isn't technically C++, it is a segment were the language is doing strong.

Mark Miller
Mark Miller

I've heard for a few years now that at some point the industry is going to move to 64-bit computing. I think I remember that Windows 7 was supposed to be 64-bit by default. Isn't this a way to get more speed out of existing microprocessor technology, and slow the need for ever growing cores? I agree it'll come up again, but maybe this would buy time.

lucio_ferrao
lucio_ferrao

I remember the time I had to find memory corruption bugs in a web project with more than 200k lines of code written in C. Everything was rather clean and used memory pools, but a small set of bad code was responsible for severe side effects only detected hours later. I can tell you those were really unproductive days. Now I see windows development and general IT/Web development moving very fast to .Net or even high level tools like the OutSystems Agile Platform. The way I see it, only Unix, Mac, and gaming console development keeps very tied to C & C++. For the gaming consoles, it is rather simple to understand their very high requirements in terms of processing and memory usage as a justification for using C and C++. But in the Unix and Mac environments the major reason for it is probably the lack of a .Net environment.

Jaqui
Jaqui

"bad things about CGI (your application has to be `aware` of many more low-level tasks)." No, your application doesn't need to be more aware of these, than it would in .net or any other language. The CGI means you can, and should, use the system tools for those tasks, rather than using a customized version of those tools functionality, which actually seriously impacts performance.

JackOfAllTech
JackOfAllTech

Most of the programmers I know, myself included, despise .net, think Java is too verbose and slow, and have only glanced at Ruby. It's silly to talk about C/C++ in a Web environment, that's not what it was made for. Any fool with a couple of hours to spare can put together a pretty web page. After a couple of days, they can use whichever .net crap pseudo language of choice to make it interactive or whatever. When you want to write an OS or an enterprise-class application however, then you're going to need something with some power and someone with knowledge and training.

Justin James
Justin James

Most people are not writing games, OS', or othert things that need the speed and low-level flexibilities of C++. I may add, you *can* write very good games in .NET, thanks to the XNA game studio, which allows them to run on both the PC and the Xbox 360. J.Ja

Sterling chip Camden
Sterling chip Camden

It's the ultimate hacker language. What I find most interesting is the way you can adapt C to various programming methodologies by convention. For instance, you can do FP in C by using function pointers and avoiding side-effects. You can also do prototype-based inheritance using structures and function pointers.

Tony Hopkinson
Tony Hopkinson

From a technical point there are several alternatives, from a practical standpoint C/C++ is indeed a mainstay. I look at this way, if we didn't have it, we have to invent something like it before we could do some very critical things, like have memory managed frameworks.... From a purist point of view I'd have rather had Pascal based languages than C. I'm not a big fan of loose static typing, but that didn't happen so I just have to live with the run time errors instead of compile time ones.

Slayer_
Slayer_

And I believe the GTX280 has 240 processing cores. Our primary boards, processors and software is so far out of date at this point. We can probably blame MS for that, holding us on a 32bit OS for 15 years.

Justin James
Justin James

For .Net (and probably Java) developers, as well as developers using PHP, Perl, Ruby, Python, etc., the 64 bit move is seamless. For folks working at a low-level (assembly, C, C++, and so on), it's not. The fact that these managed/interpreted code environments free the developer from having to be aware of the underlying hardware and OS (to an extent) is both a very powerful argument for their use, and a very powerful argument against their use. J.Ja

Jaqui
Jaqui

obviously you don't pay attention to the open source world. the Mono project is an open source .net framework. there is also the Lucene .net framework avilable, the library most commonly used on GNU/Linux being the Lucene.NET based libbeagle. edit to add: and I do not install anything that uses it, since BLOAT is criminal to me.

Tony Hopkinson
Tony Hopkinson

.Net in terms of framework, nothing new really, in term of byte code, nothing new, in fact the only that's new is the label. Don't get me wrong I use and like it, but I liked writing in C and pascal as well, crap I even liked assembly. Yes it's easier and quicker to write good code with a modern ide and compiler, but that isn't why they have become popular. That's because you need nowhere near as much skill and ability, to turn out something that's good enough or far too absolutley horrible. The only thing that has to do with MS, is they are the poster boy for dumbing down our discipline. Be careful what you wish for....

Justin James
Justin James

Last time I worked with the CGI model (not including PHP work), my apps were handling everything about the HTML *and* the HTTP layers, like spewing out the entire set of HTTP headers myself. That's what I meant about needing to be aware of the lower levels. In some systems (CGI.pm, PHP, etc.) your libraries can do the heavy lifting for you, to an extent. In others (like running straight Perl like I used to do) you really have to know the work at a low level. In some ways, it was a good thing, but at the same time, writing code to dissect the GET/POST (I was deliberately avoiding CGI.pm) wasn't much fun. Working in CGI is very close to writing a command line, non-interaction application, which is why it feels like home to *Nix devs (and did to me too, coming from a Pascal, COBOL, and old school BASIC background like I did at the time). But for someone who cut their teeth on Java or .Net (that is to say, anyone in the last 10+ years), it is a hostile environment. J.Ja

joeller
joeller

Any fool can put together a pretty Web page? You think so? I know better. Prettifying the web page so that it meets industry and customer standards is complex enough that in our shop it is left to specialists which is all they do. Many is the time that I have heard supposedly professional Web pages trashed as horribly constructed and poorly designed. (First Doofus prize goes to the Washington Post for their www.WashingtonPost.com. Tech Republic and Experts-Exchange have also elicited negative comments.) As for building the functionality into the page, maybe someone should tell the intern I am working with how easy it is, as he has spent a week on a web page that I have already completed 7/8 of the work on. In the modern world any enterprise level application is going to be built of web pages, web apps, with calls to either server based classes or web services. Not even the Department of Defense, which perenially lags technology by a couple of years, is spending any time or money building enterprise level desktop or standard client server apps. As far as writing a new operating system, why would anyone do that when there are so many commercial and open source one out there unless that is your company's business.

Tony Hopkinson
Tony Hopkinson

high powered processing, stuff where the overhead of something like the ,net framework would kill your chance of achieving what you want. You'd have to be some sort of masochistic nut, to not use one of those languages to do your GUI or even CLI though. The languages and frameworks are not the problem, the real problem is that instead of using the productivity boost to get more out of good programmers, business chose to get considerably less out of cheaper ones. The demand is not for more programmers, it's for cheaper ones.... Modern languages are extremely good tools, choice of tool, and competence with them, well that's a different matter. We knew were f'ed they day someone asked for help with their multi-threaded enterprise VB6 application, with the access backend....

Jaqui
Jaqui

as Justin noted in the article, when all those legacy apps need work done, the *x world will have lots of people who use the languages. :D them poor "proprietary" software houses will be forced to pay Open Source devs huge to maintain the proprietary apps. :D

Justin James
Justin James

Regardless of what people *think* about .Net, Java, etc., the fact is, more and more work is being done in them, especially as more and more apps move to the Web (even ones that definitely should not be). We're now seeing a number of people actively trying to push out office suites on the Web. A good idea? Not in my mind. But that's the reality of the situation. At the same time, C/C++ are absolutely miserable to work in. The simple fact is, computers are a lot less unstable as more and more apps are written in Java and .Net; it's a matter of training and experience. The demand for developers is so high right now, even in the down economy, that there is no way that people could get the same level of training like they did 20 years ago in sufficient quantity to fill the need. Fact is, if you look at how awful so much software is now, even in "safe" systems like Java and .Net, imagine what would happen if it was written in C or C++? Again, I am not saying that this is the greatest thing in the world. J.Ja

evanmathias
evanmathias

Its failing is its a little too powerful for its own good, so we could argue its not secure and can corrupt the OS. Well written managed code likely requires a good understanding of C++. And well written managed code can run as close as a cucumber to C++, even using pointers. That said, well written managed code is likely to run a heck of a lot faster, as c++ there are many wheels to reinvent. Maybe the days of an application fitting in 64Kb are just rumors and speculation ;)

Jaqui
Jaqui

C is never really going to die. It is small, but incredibly powerful. and you can write everything for another language in c to create your new programming language. PHP, Python being 2 examples.

LarryD4
LarryD4

I know this thread is mostly business developers but C++ is alive and well in the 7 billion dollar gaming industry.

Mark Miller
Mark Miller

I realize the challenges of moving C/C++ software to 64-bit, but I thought Microsoft would be providing a migration path for that software, getting developers ready for it, and all that. When 32-bit Windows came out MS provided 16-bit Windows emulation. Even before it came out MS had the Win32S runtime and API that would work on 32-bit architecture. Couldn't the same thing be done with native code 32-bit apps.? It doesn't sound like MS is focused on doing that, just hoping that .Net adoption will expand enough so that people won't notice. Is Windows 7 going to be 32-bit because of the installed base that can't migrate easily?

lucio_ferrao
lucio_ferrao

Don't get me wrong. I know and admire open source projects, and I'm not defending .Net as a thechnology. I'm just trying to explain that most people need to feel productive and confortable with what they are doing, and most people feel that way with .Net. I remember when I deployed a solution based on Linux in 1996 and spend multiple days looking for a freezing bug that ended being a kernel bug (from a bad network driver). It was surely fun for me at the time, but not that fun for my paying customer :) Cheers, Lucio

Jaqui
Jaqui

I didn't catch where you were coming from, I thought you meant low level like hardware level. :D even with a CGI lib you need to know the HTML headers required for the site, since you have to plug that info into the lib to use it. as far as using .net/PHP/ASP ... built in functionality to spit out the html automatically, well, badly coded sites that do not have valid html abound from that use.

Oleg F.
Oleg F.

If an easy-to-learn language can replace a high-performance language then there is no tasks remained for the language being replaced. If .NET, Java and other languages are going to replace C++ in Web environment aren't there really tasks where C++ could help with WebApps? A query returning from a database a huge array of records could generate a lot overheads during its processing. C++ could help reduce those overheads. Why that does not keep a demand for C++? Is huge array processing a rare situation in the Web environment? What performance issues do Web developers face which suppress overheads reduction benefits?

Mark Miller
Mark Miller

For years in the 80s and 90s, in survey after survey, Basic and VB were the most popular languages programmers used, even though back then in the hacker community the attitude was "C is what real programmers use." I'm not trying to make any chauvinist judgments by saying this, but it could be the same situation with Java and .Net WRT C/C++. I remember when I went to my first .Net introductory event in 2001 I was shocked at how few C++ programmers were there. There were at least 1,000-2,000 people there, and most of them programmed in VB. I remember they asked how many C++ programmers were in the audience. There were literally just 4 or 5 of us in the whole place! Pretty ironic when you consider how shafted the VB community reportedly felt when the final version of VB.Net came out, and the language that grew in popularity the fastest in the .Net realm was C#. I have to agree with you about software quality going down. I was rather surprised. I bought a Linksys router last year that came with a CD that had some "easy setup and link" software written in .Net 3.5, which I tried running on my Windows desktop (I had bought a Linksys wireless adapter for it and was trying to configure it). This "easy setup" software was supposed to make connecting with the router very simple. Instead after working with it for an hour or so I realized that it might as well have been a beta version. There were features on it that were just plain broken. It would act like it was doing something, like trying to connect to the router, but in fact it was just sitting there doing nothing. Other features just plain didn't work. I'd run them and I'd get an "unhandled exception" error. The app. itself never crashed, which speaks to the greater reliability of the platform you were talking about. It looked very nice as far as the UI. But underneath it was a piece of crap. I got a little use out of it with the features that did work, but I stopped using it after a while. I found it was just easier to deal with the default Windows wireless facilities, even though the Linksys documentation "recommends" you use their software. What a joke! As for the Linksys router itself it works well. I've been using it with my Macbook Pro for several months with nary a problem. I didn't bother installing the Mac version of the Linksys software. I'd rather not mess up my system that way...

Jaqui
Jaqui

only if you don't write it secure. :p no program is secure unless the programmer makes it so intentionally. It is harder to secure a program written in the "modern" languages, because you have no access / control over the code in that "framework" used.

Tony Hopkinson
Tony Hopkinson

and there's still a good bit about on windows. It's no longer first choice for basic crud apps, because they don't need that much power or complexity. Java, VB, C# do the job, and it's much easier for us thickie business developers to use. :p It's all about inherrent level of abstraction, if you want cheap cookie cutter types to cut the development cost, you can't go around confusing them with the in your face compexity of a language like C++. It's power is based on it definitely not being idiot proof, whereas later languages sell themselves at least purporting to be.

Sterling chip Camden
Sterling chip Camden

There are issues, yes, but they can all be identified and dealt with if you know how. The Synergy/DE compiler and runtime run native on both 32-bit and 64-bit. We use the same source code for both, with ifdef's where needed.

Justin James
Justin James

There might be issues like that, I wouldn't know (thankfully). I do know that Office 2007 seemed buggy under XP Pro 64, which is one reason why I am using 32 bit Vista now. When I move to W7 in the future (possibly in July, possibly later), I'll definitely be using 64 bit, since I plan on starting with 4 GB of RAM and expect to upgrade to 8 in the future, if I don't start with 8 to begin with (or possibly 6, I have to look into this triple channel RAM stuff). J.Ja

Mark Miller
Mark Miller

Back in the days when 64-bit extended Windows XP was being discussed I thought there were problems with window messaging in C/C++, because the number of bytes in the messages changed. The same was true in 16-bit vs. 32-bit Windows. That's the reason an emulation environment was provided for 16-bit apps.

Justin James
Justin James

In Windows (and *Nix too, for that matter), it's not like it was in the 16 to 32 bit shift. There's no need for all sorts of bizarre tricks and tips to make it work. The older code just works. That's why you really aren't seeing a big push on it. In .Net, for example, going 64 bit is a matter of a simple compiler setting. Also of note, is that the shift from 32 bit to 64 bit carries much less advantages for the typical application than moving from 16 to 32. Sure, the OS gets a lot of good leverage in the shift. But normal apps? Not so much. J.Ja

Tony Hopkinson
Tony Hopkinson

The .net code that calls the event handler swallows any exceptions in it.... I wish I could agree with you that's it's better, but apparently not.

jslarochelle
jslarochelle

In practice you run into all sorts of problem using MI. The famous diamond problem is only one of them. Method name clashes is another problem you can have. It is just not the right tool for the job. Also, independently of the mechanism, I don't think that true multiple inheritance is that widespread in the real world. Most of the time, what looks like multiple inheritance really is aggregation. In most situation delegation is also a more flexible and powerful technique (allowing changes at runtime). Ruby mixin and Scala traits are convenient and avoid the diamond problem. However, you still can get method name clashes and you don't get the flexibility of delegation. I think MI and mixins can be used to manage cross-cutting concerns without resorting to external AOP or dependency injection tools. This is useful but is also a more specialized application. JS

Oleg F.
Oleg F.

Inheritance is chosen against composition when one class (derived) has relationship "is a" with another class (the base class). It is a multiple inheritance when one class has relationship "is a" with several other classes. I agree that such a complex relationship between objects as multiple inheritance is not too often encountered in real life software development (I mean relationship between objects and not interface implementation). But it really exists. And from project to project it is encountered in real life software development. So I cannot understand for now how multiple inheritance can be implemented using just single inheritance in languages that do not support MI (like Java and C#) in a straightforward manner. It seems that such languages are intended to support a simplified object model only.

Oleg F.
Oleg F.

Ok. I agree with your reasoning about multiple inheritance. I just would prefer having MI at my disposal in an IDE as soon as C++ standard supports it. And I think I would choose to use it in some project sooner or later.

Sterling chip Camden
Sterling chip Camden

It's often a case where they're trying to use inheritance when they should be using composition instead. In fact, with languages that don't support MI, composition often makes a more workable solution than implementing an interface.

Tony Hopkinson
Tony Hopkinson

don't implement it anymore, is that it's been badly abused. I feel those perfect secnarios are limited and limiting, just resolving a naming collision from an enhancement/bug fix can take days, it's quite likely you'll get no help from the compiler are well. Interfaces are more work to write but more flexible and easier to maintain. I'd like the option but I don't need it.

Tony Hopkinson
Tony Hopkinson

I have more than a few, which one was I waffling about as I can't find the post.

Jaqui
Jaqui

each smaller section as a project then make a project group out of all of them and you have the complex project. :p

Oleg F.
Oleg F.

I know that Scott Mayers in his book does not advise for using MI until it fits the design very right. And I happened to work in some projects where I needed MI to simplify the design as well as the code to great extent. I agree that MI is not the best choice in many cases but it's obvious that some project just require multiple inheritence. Tony, I cannot find a link to your book in the Web. Could you, please, provide one?

Sterling chip Camden
Sterling chip Camden

For a language like C++ that doesn't provide proper mixins, MI is the only proper abstraction for some problems. Java's answer (interfaces) is the Playboy Magazine version of MI: it shows you what you want, but the implementation is entirely up to you. The trick with true MI or mixins is to have clear and intuitive rules on how issues like the diamond problem are resolved.

Tony Hopkinson
Tony Hopkinson

(ARGHHHHH !!!!) in my book. I use Delphi a lot, things like go to definition appeared in Delphi 2005 (may be 8, but no one sensible used that) , mind you so did an absolute shed load of bugs. Total coincidence that they rewrote the IDE in C++ to get both 'features' :D

Oleg F.
Oleg F.

I used to work with C++Builder 6.0. As I remember its compiler did not support multiple inheritance (because of VCL). Also its IDE was much less powerful compared with Visual Studio. For example it did not support 'Go to definition' functionality.

jslarochelle
jslarochelle

My interest in Netbeans was renewed by the effort that was made for the Ruby integration. Netbeans really is a great Ruby IDE. Using it I found that most of the things it does it does really well. Eclipse however has more plugins available and we used several of them on a regular basis so switching the whole group would not be obvious. Netbeans strong point are: UML integration works well "out of the box" Ruby support is really great C++ support was really good for me The Groovy plugin is good in both IDE The Scala plugin is also good in both but I think there really is a big effort on the Eclipse plugin right now so things might change. I can't say that I see a really big difference in responsiveness between the two except maybe for Java where the incremental compiler clearly is an advantage. JS

DHCDBD
DHCDBD

I feel that overall Netbeans is the better IDE but I still use Eclipse because Eclipse does things that Netbeans cannot and is a quicker reponding IDE.

jslarochelle
jslarochelle

I only did a couple of small GNU projects with it but I liked the way it work for that. For me Eclipse (my main Java environment) for C++ just didn't feel as solid. Since Netbeans is free it certainly is worth a try. JS

Tony Hopkinson
Tony Hopkinson

it will be quicker and way more satisfying. One of my big stumbling blocks at the moment is "Why can't you make the windows components work in C# like they did in Delphi?" :( :( :(

Justin James
Justin James

Embarcedero just got me an "All Access" membership last night, I have a copy of C++ Builder to look at... J.Ja

Jaqui
Jaqui

is from automake. the makefile.in is a scripted input file that is used by the configure script to create the true makefile. as far as the different uis go, cli and the gui just as a wrapper to access the cli and "pretty it up", no need to use the case statements. that's the "norm" for the *x world.

Tony Hopkinson
Tony Hopkinson

but I was alluding to separation of concerns more than anything. If you write for several UIs, you won't have some big case statement in the middle of your code Case Bash: Case Gnome: Case KDE4: etc Only one in windows, means a lot of people crossing over just build it in to the app, and then look dumbfounded when their peer review doesn't go too well.

Tony Hopkinson
Tony Hopkinson

for C++ which apparently it can do after a couple of twiddles. But only if I can't get my head round a more basic solution automake SciTe and G++ etc Tried KDevelop didn't like it all. Got to say VS2008 is my IDE yardstick, but on the linux side I'm more interetsed in how things work than working on it if you see what I mean. KDevelop for instance seemed to have a 2,000 line make file I could n't make head nor tail of for Hello World.cpp, I found that irritating. Linux Cookie Cutter is not one of my goals. :(

Sterling chip Camden
Sterling chip Camden

For apps, cli is preferred, for development, it is required. We don't need no stinking IDE. But end users are a different story. They've been trained to think that if they need to use the keyboard to launch an app, something's missing.

Jaqui
Jaqui

only if the app has no need of user interaction Tony. :p otherwise, cli required. ;) naw, just write code that works on the desktops, all of them and the app will get users. GTK widget set is C, not C++. to use C++ with GTK you need the GTKMM library, it adds C++ bindings to the widget set. Mono is pretty much it for .net support on *x systems, and there are a lot of people who won't use it, OR an app that requires it. posix compliant C / C++ code will get a better reaction. The QT widget set pretty much only gets used by KDE and KDE apps, everything else uses GTK. WxWdigets supports both, but seems to default to GTK what do you mean "polished" ide? you mean fancy bloated garbage like M.S. Visual Studio? try Eclipse, if you can handle having piss poor performance of your system from having java installed.

Tony Hopkinson
Tony Hopkinson

Mono is barely relevant to it. The real issue you have will be switching the OS and then interacting with it, and to be honest if you use Visual Studio, some much less polished IDEs. The other biggie in nix land you'll bump into, is people expect a version of your code that works from the command line. Interaction with a desktop (of which there are many choices) is an optional extra. In fact in terms of writing code the CLI is a default optional extra. Your code is expected to behave under nix as well, pipes and redirects etc. Got to remember efectively windows is a deskop with an OS inside it, nix based OSes, the desktop is merely a skin you can choose to run or not...

Tony Hopkinson
Tony Hopkinson

That isn't what I said. I can write C++ that could outperform already JItted c# (or C++) but it isn't a free lunch. It would take longer for me to write, the code that I wrote would be bigger and proably more complex, therefore harder to enhance and maintain. The big question is how much faster, and in all but extreme situations, the answer is not enough. For instance only a complete berk would write a database or webserver in .net, you'd have to be equally daft in my opinion to do a front end GUI for it, (given .net was going to be on the machine anyway) in anything else. They key is you are not going to replicate a .net library function in it's entirety in raw C++ noticeably faster than the compiled .net version, so why bother. But if you only need a part of it... If you already have C++ just do C++.net. unless you do something wrong or very right the IL will be almost exactly the same. It's .net that has the impact in terms of end product, not C#. .Net is langauge neutral, that's one of the things that makes it so elegant.

olegtech
olegtech

I hope that Jaqui or someone else from *x world will read and respond to this topic (I develop for a "proprietary" OS). As a room for C++ applications for Windows seems to be getting narrow it's interesting to know if I could save my C++ experience by moving to *x development? Is Mono project going to do with C++ for *x OS the same thing as .NET is doing now for Windows? (I could repost this message at the top of the discussion tree if someone supports this idea).

olegtech
olegtech

The fact that retrieving data from an sql server (which in adition is likely to mean reading data from a hard drive) could be a major cause of performance drop is not a surprise for me. But I did not expect that C# could do things as fast as C++ does. I just started to investigate C# performance recently which led me to such a guess. And you've just confirmed it. Thanks a lot. I will ask Jaqui now about C++ for Unix...

Tony Hopkinson
Tony Hopkinson

Loading everything clientside to process is a last resort option and you'd have to be doing something completely mental and very slow to change to make C++ a better option overall than say C#.

Jaqui
Jaqui

have discussions with the threading collapsible, and default them to closed, for when they get really large. hmm, would need to highlight a closed thread if there are new posts in it. I wasn't disagreeing with the point of your comment, just the one part where a large result set means bad design / code. it usually does mean you screwed up somewhere, but not always. :D

Tony Hopkinson
Tony Hopkinson

Could have only loaded the top level posts, for instance. Course it all depends on what you mean by 'processing'. But either you need to do more processing on the server, process in small batches, or suck it all client side in a massively inefficient fashion and then try to ameliorate that design failure, by saving a few clock cycles in an inner loop, accepting that you've lost an asbstraction layer, added complexity, reduced longevity and added a large maintenance overhead. It's certainly not a good argument for why C++ is valuable to web development in technical terms, and it's of dubious long term benefit in business ones.

Jaqui
Jaqui

That monster discussion* that would take 10 minutes to open here on TR is a good example of a large return set not from bad connectivity or sql. * I WILL NOT risk revival by naming it. :D

Tony Hopkinson
Tony Hopkinson

You need far more help with client server, databases, and SQL not C++ ....