5 ms·
>"But remember, C++ has a good 10 year head start on java, and java gained a lot of traction because of all the tools they didn't have to build" The thing is..
by pmelendez 10y ago
>"But remember, C++ has a good 10 year head start on java, and java gained a lot of traction because of all the tools they didn't have to build"
The thing is... I don't think Java took over C++ developers. Most likely they took over Pascal, Delphi, VB, Perl and other enterprise developers.
Every decade there is a language that claims to kill C++ (Java in the 90's, Go in the 2000's) offering features that are not bothering C++ developers and end taking off by attracting developers from other communities (like Go with Python devs).
I believe that memory safety or manual memory management is not the mainly concern for a C++ developer. On the other hand, if you give the same tools that C++ has and reduce complexity and then you might got into something, until then...
- lmm 10y agoDepends what you mean by taking over. Certainly C++ developers are a much smaller proportion of developers now than they were in 1990, and much of the difference is made up by Java. Are those Java developers writing the same style of code with the same interfaces that those C++ developers were doing? No. Are business problems that used to be solved in C++ now solved in Java? Yes, often. I don't think we'll ever see a mass exodus of C++ developers to other languages - but in truth we never saw one from Pascal, Delphi, VB, Perl or Python either. What we will see is the niche where C++ is appropriate gradually shrinking, the borderlines between what's appropriate for C++ and what's appropriate for Java etc. changing, until one day we notice that there's hardly anyone writing C++ anymore. E.g. 20 years ago people would have said there was no way you could write a game except in C++ (or assembly). 10 years ago people would have said ok, you can write some games but not an FPS. Nowadays people say ok, maybe you can write a high-performance game without writing any C++ yourself but the engine you use will still be written in C++...
- tamana 10y agoYou are forgetting that Enterprise WAS C++ before Java. Amazon went from C++ (to Perl) to Java. Google went from C++ to C++/Java (and now Python and then Go) Microsoft went from C++ to C++/C# , C# is Microsoft flavor of Java.
- ausjke 10y agoIn certain areas such as games, GPU, etc C++ still rules, which is why I restarted on c++ nowadays.
- pmelendez 10y agoGoogle started with Java and Python, not with C++. Microsoft is a bad example because they pretty much do everything in C++ (Office, Windows, VS, etc). Also by enterprise I meant banks, insurance companies, factories, etc.
- catnaroek 10y agoYou can't reduce C++'s complexity without eliminating core language features. This is precisely why people talk about “sane C++ subsets” (although the very idea is silly). Of course, C++'s features were designed to address important use cases, so workable replacements must be provided in their stead: (0) By far, the most important use case for templates is emulating parametric polymorphism. The solution is obvious: provide actual parametric polymorphism. (1) The other important use case for templates is performing compile-time computation. This is done either by pattern matching on types (which parametric polymorphism forbids) or on values (e.g., integers) promoted to the type level. The latter feature is available in Haskell (`DataKinds`), and its design can be borrowed mostly as-is by systems languages. (2) Classes combine, in a single language construct, features that ought to be separate: user-defined types, encapsulation (access specifiers), code reuse (inheritance), etc. Again, the solution is obvious: split these features into different language constructs: structs and enums, module-level privacy, parametric polymorphism, etc. (3) Ad-hoc polymorphism is useful, but overloading as done in C++ is too unconstrained to support modular type checking of users of overloaded operators (templates). Again, the solution is known: type classes.
- pjmlp 10y agoC++ only started to gain weight in the 90's, Java came in the 2000's. Before it had a JIT no one cared. Also just we C++ 90's hipsters were doing systems programming in C++. Most developers were finally getting convinced that in home computers C, Pascal dialects, Basic compilers, Modula-2 and so forth were getting good enough not to depend on piles of Assembly code. C++ was getting used in GUI toolkits, CORBA and DCOM and seen as too high level. Hence why the commite tried to specify the Embedded C++ standard, to cater to the more hardcore C developers.
- pmelendez 10y agoJava first version was in 1995 and people cared about it before 2000 for sure (Google's first version was Java and Python and was in 1998)
- pjmlp 10y agoYou mean the people doing browser animations in applets? I only used it in 1999, because our teachers at the university wanted to use this new cool language from Sun. At banks. insurances and telecommunications businesses, we were all doing C++ with CORBA and DCOM, using MFC and VB 6 as frontends on the desktop. The amount of Delphi users were already ramping down thanks to Borland's mismanagement.
- pmelendez 10y agoI worked at a bank in 1998 porting applications from VB6 to Java, and not they weren't browsers applets, there were servlets which were available since mid 1997. There are still a niche for C++ in banks (i.e transactional server applications) but pretty much all the business logic applications (that counts for 80% of the code of most banks) were starting turned to Java by that time