6 ms·
C++ is everywhere, but no one talks about it
- CraigRo 3y agoIt is an excellent language for situations that requires low latency or raw throughput on a single processor, or systems and embedded programming. These situations are less common in be development because it is often cheaper to use more productive languages and more and more powerful computers to solve a given problem.
- jonas-w 3y agoWhat is this "sh".reddit.com subdomain that the submitted link has?
- ksec 3y agoIt is the third gen UI in the making ( Apparently for a few years already ). The first one is old Reddit, the 2nd is React? / JS FrontEnd based rendering. The 3rd ( "sh" ) if I remember correctly is based on something similar to Livewire / HTMX concept.
- vsskanth 3y agoWow this is so much faster than the current reddit UI. Thanks.
- reaperman 3y agoYeah this one sucks so much less, at least purely in terms of performance.
- Conscat 3y agoOn mobile, I'm logged in, and any time I click on reply or add a comment, a pop up tells me to log in before commenting (or open the crappy Android app). I even clicked the "log in" button on the pop up, and afterwards it still won't work. That's a pretty pathetic bug to have after years of work imo. Not one of them thought to try it on mobile...
- ksec 3y agoWell that is because the SH. Reddit AFAIK wasn’t suppose to work for logged in user. I am not even sure if it was accidentally exposed to the public.
- ttepasse 3y agosh.reddit seems to be build ful on web components with lit, different than HTMX. Looking into the web inspector is certainly depressing if your tastes come from the era of “semantic” HTML and progressive enhancement. But well. The real sin of new.reddit wasn’t really the technical underpinnings, but the UI design. Here it seems even worse in parts: permanently clicking just to read the comments.
- suby 3y agoAnd some of the clicks (at least on mobile), for reasons I can't discern, take you to a new page for the root comment that you clicked more replies to. It makes it so that when you press back to read the rest of the comments, you either need to click load more comments again on everything, or your page has scrolled past the natural cutoff for the default show comment count so now you're looking at new threads. I don't know who designed this, but it is truly awful.
- mastercheif 3y agoGet the hint: they want you to use their app.
- suby 3y agoYeah, that is never happening. About two months ago they were doing AB tests where they've disabled web browsing for some mobile users, telling them that they need to use the app. If they ever pull the trigger with that, I'm simply not going to use the site. This is coming from someone who has been using Reddit since 2006.
- yen223 3y agoTo confirm a theory that I had [0], I once tried to track what languages the software I actually use is written in. I basically arrived at the same conclusion as OP - almost everything I use is written in C++. From the browser, to my favourite games, to even the backends of a lot of websites I use frequently, it's pretty much all C++ with other languages sprinkled in. This, mind you, is not even counting the fact that most JVM implementations and Node interpreters are also written in C++. If I ever wanted to learn a new language, C++ would be it. [0] The theory I had was that almost none of the software I use is written in Haskell. Which was true by a long shot.
- SubjectToChange 3y agoThis, mind you, is not even counting the fact that most JVM implementations and Node interpreters are also written in C++. Moreover every major C compiler (GCC/Clang/MSVC/etc) is written in C++. So any C projects depending on those compilers is indirectly depending on C++, e.g. Linux. Not to mention the success of LLVM among other languages.
- commandersaki 3y agoThe only distinctively Haskell software I use is shellcheck. koalaman did say in an interview that he had slight regrets it was in Haskell since it made it difficult to collaborate / receive contributions.
- syntheweave 3y agoI think this ultimately just reflects on a certain generation of software that we're still using - a 1990's, Unix-ish, graphics-oriented, Internet-capable stack. I don't think we're staying there, either. C++ is very long in the tooth. Most people looking for a C++-like thing now gravitate towards Rust(with a little bit of deviation for stuff in roughly the same ballpark like Nim, D, and sometimes Zig). And many of the old projects are looking towards migrating to new languages as well. It's just a matter of the critical masses shifting.
- SubjectToChange 3y agoNothing is forever but this totally discounts the primacy of C++ across tech stacks. Rust and any other language leveraging LLVM is depending on a healthy C++ ecosystem. Anything to do with GPGPU is aggressively C++ based, the entire HPC segment is pivoting hard towards C++ (Kokkos, SYCL), and it’s likely orders of magnitude easier to rewrite the entire Linux kernel in Rust than it would be to rewrite chromium in Rust.
- tayo42 3y agoThere arent really a lot of jobs in c++. It might be pretty foundational but all the other languages are much more prevalent. like game engines are c++ but there are so many game engine writing jobs, much more game engine user jobs.
- Reticularas 3y agoBasically all game engineers use C++, regardless of they are working on the engine or the game. It's wildly perf focused.
- DoctorDabadedoo 3y agoThe job pool is smaller, I believe, but with high earnings potential (luck™), mostly in fields where performance is not a plus, is a must: games dev, robotics, HFT, system engineering, etc.
- constantcrying 3y agoC++ is the default for natively running software. There have been competitors, but many of them have failed for a variety of reasons. Even if you are writing in a completely different language, at some point native software will have to run, maybe you need a compiler or an interpreter, but chances are C++ will be involved with that.
- pjmlp 3y agoUnfortunately not for UNIX clones and most embedded stuff.
- constantcrying 3y agoEmbedded is nowadays a wild world, where you can run stuff like python. But the fact that the ancestor to C++ is still so popular there shows how difficult it is for other languages.
- pjmlp 3y agoMost modern embedded microcontroller are more powerful than any home computer and early PCs until the Pentium generation. So lots of power to run most programming languages. The biggest problem is cultural.
- throwbadubadu 3y agoNot true, sure there is "embedded" growing computationally more and more (but since 20 years already at least, what is nowadays??), but there will also always be the embedded size of few kb flash and ram that won't allow you any OS like on the system but require you at most running one of those tiny schedulers without memory protection, because key optimization factors there will always be cost, size and power consumption.
- pjmlp 3y agoEnglish lesson, "most modern" doesn't mean all of them. Secondly, "CppCon 2016: Jason Turner “Rich Code for Tiny Computers: A Simple Commodore 64 Game in C++17” https://www.youtube.com/watch?v=zBkNBP00wJE https://www.youtube.com/watch?v=zBkNBP00wJE "C++20 For The Commodore 64" https://www.youtube.com/watch?v=EIKAqcLxtT0 https://www.youtube.com/watch?v=EIKAqcLxtT0
- pjmlp 3y agoYeah, it might have inherited C's flaws, introduced some of its own, currently have some existial crysis how to evolve the language under ISO processes, lost some of domains it owned during the 1990's, yet isn't going anywhere for the foresable future. Even if its role would be restricted to language runtimes, drivers, GCC, LLVM, game console SDKs, and GPGPU programming, that is enough to keep the language around for a couple of decades more. We don't need to use the same language for everything.
- rramadass 3y ago> We don't need to use the same language for everything. True; but it is very convenient and productive to use one single language for everything, particularly when it has "multi-paradigm" support. I find there is less cognitive load which allows one to better focus on the domain problem-solving.
- pjmlp 3y ago"Jack of all trades, master of none", also applies here. Hence why there are a couple of domains where C++ used to dominate 20 years ago, and eventually were taken over by other languages, most notorious one, GUI frameworks. It turns out lack of reflection and automated memory management doesn't lead to productive workflows, and tooling.
- MichaelZuo 3y agoIt's a shame then that nobody in the world fully understands C++.
- pjmlp 3y agoPeople love to complain about this regarding C++, and is true. Yet they keep forgetting it equally relates to all mainstream languages older than 20 years in production. I bet no one would manage a pub quiz regarding any of them, if the questions were honestly based on the language complete history, thus not fully understanding them either.
- nathants 3y agoafter a decade of js, py, clj, and go, i’ve been writing c++17 with clion for six months. it’s actually fantastic.
- dkersten 3y agoMy day to day over the past 15 years has been similar to you: Python, javascript, Clojure and clojurescript and some Java. In my free time, for a few years now, I’ve been writing C++ (17) and I love it.
- rramadass 3y agoC and C++ are everywhere. Fixed that for you. I tell everybody who cares to listen to learn C & C++. They are the common "glue languages" which underpin everything with a huge established ecosystem and gives you the ability to program anything and everything. Contrary to what HN threads might lead you to believe, they are not that hard to learn and do not need you to become an "expert" in all aspects (i.e. dark corners) of the language. You will pick up the tricks/expertise when you need them.
- pjmlp 3y agoYes, despite my C rants, if a project would need to reach out to C, so be it. These languages will outlive the HN audience, regardless how we view them.
- fulafel 3y agoPart of the reason is that desktop operating systems & native software have huge inertia and path dependence. Code bases are 20-30 years old.
- xen0 3y ago'Most' software is unseen. You'll never see the myriad of hidden Java services or tools that are internal to 'BigNameCorp Inc.' You won't hear of the tiny bespoke C# apps that some little dotcom uses to manage some of its processes. You'll never touch the layers of Python glue holding that Fintech startup together. Software you see, you know, is either native apps for consumers or Web frontends. Of course C++ and JS dominate. But there's so much more hidden away, a whole world just tucked under a job interview so most don't see it. In this place, Java may very well be King, but Python, C# Go, and yes, C++ all have their parts to play.
- sr-latch 3y agoThis reads like a poem, I love it
- vpastore 3y ago[dead]