5 ms·
> Java would replace C++, who thought C++ would replace C, who thought Windows would replace Unix All of these have happened, for many use cases.
by dbaupp 10y ago
> Java would replace C++, who thought C++ would replace C, who thought Windows would replace Unix
All of these have happened, for many use cases.
- milesrout 10y agoNo, they haven't. Stop believing everything you read on reddit. Java didn't displace C++, and C++ certainly hasn't displaced C.
- dbaupp 10y agoGreat example! I read reddit via a browser written in C++ on a Windows machine (written in C++) or on an operating system compiled by a compiler written in C++... or even an app written in Java. Software engineering still uses languages/tools from the first few years that it existed, so it's unlikely that anyone means "completely replace every single LoC inexistence" when they say "replace".
- pjmlp 10y ago> Java didn't displace C++ C++ has become an infrastructure language on the enterprise. We write native libraries in it, like COM components, or plugins that interact with Python, Lua, Java, .NET, Node,... VMs. No one writes full stack applications in C++ any longer, other than maintaining the existing ones. Even game engines have moved into a mix of C++ + higher level language. On the mobile OSes, C++ only has GUI support via the Objective-C++ and C++/CX dialects. On Android it gets the JNI wall. > and C++ certainly hasn't displaced C. Your favourite C compiler is written in C++. The only place where C has an edge over C++ is the embedded space, *BSD, Linux kernel and the GNU tools.
- lrem 10y ago> No one writes full stack applications in C++ any longer, other than maintaining the existing ones. That is not my experience. Somehow both me and my wife ended up developing new C++ applications for a living.
- pjmlp 10y agoAre you developing those C++ applications for the enterprise? Can you disclose which type of full stack applications are those?
- lrem 10y agoIn my case a bunch of microservices. This included a rewrite of a legacy monolithic service written in Python. The C++ rewrite was not only more efficient and maintainable, but also ended up with a quite a few more features fitting in a smaller codebase. People do underestimate the value of rewrite from scratch, which when paired with a redesign trumps any language advantage. My wife's work was (she's full time parent now) on some gargantuan backend for ticket selling service. Afaik frontend to that is also C++.
- pjmlp 10y agoThanks for replying. I would say that you could probably have gotten the same benefits from rewriting the Python system into any AOT compiled language, like Go for example. We have been doing such rewrites to Java and .NET stacks, with some C++ only on "as little as possible" basis. Frontend apps are only done in C++, actually QML, if they need to be native cross platform. Otherwise they are either native to the OS (WPF, Android, Cocoa) or pure web.
- lrem 10y agoWe have piloted go and decided to stay as far away as we can. I personally believe that rewrite to Python, preferably with static typing, would be just as beneficial.
- ndesaulniers 10y ago"There are literally dozens of us!" FWIW, I think C++ is killing it on mobile and many other platforms and disagree with the post you responded to. Just pointing out that 2 samples isn't statistically significant.
- milesrout 10y agoMy favourite C compiler most certainly is not written in C++. Many people write programmes in C++, unfortunately. Any Qt programme is written in C++, all performance-dependent modern libraries are written in C++. Whether people write every layer of their programme in C++ is irrelevant.
- pjmlp 10y ago> My favourite C compiler most certainly is not written in C++. So which one it is? As gcc, clang, icc, VC++, C++ Builder are all written in C++. Are you using tcc for production work? > Many people write programmes in C++, unfortunately. Any Qt programme is written in C++, all performance-dependent modern libraries are written in C++. Sure, even I do it. But we only do it, because during almost two decades C and C++ became the only options available for compiling code AOT to native code, with support for value types. And I would never ever use C willingly, so C++ it is. But the wind is changing and the choice for programming languages with AOT compilation to native code and support for value types, is widening. > Whether people write every layer of their programme in C++ is irrelevant. No, it reduces the usefulness of the language, the bigger the upper layers are, eventually the underlying layer can be migrated to something else. For example, Oracle is planning to replace Hotspot (C++) with Graal (Java) in the long term. Likewise Microsoft has plans to replace parts of CLR with C# now that there is .NET Native.
- therealmarv 10y agoWhen I look at large amount of Enterprise software: Yes that happened.... I see Java everywhere. Also think of Android (alone the amount of software). Of course it's seldom exclusively Java in a corporation.