C++ Logo

std-discussion

Advanced search

Re: C++ vs Python in terms of energy consumption

From: Thiago Macieira <thiago_at_[hidden]>
Date: Mon, 11 Nov 2024 22:10:55 -0800
On Monday 11 November 2024 21:07:32 Pacific Standard Time Phil Bouchard wrote:
> On 11/11/24 23:55, Thiago Macieira wrote:
> >> We don't have a lot of options left if we care about the lifetime of C++.
> >
> > You didn't prefix this with "I think", but I'm assuming it's implied. And
> > I beg to differ. There's no indication that C++ is dying. And besides, i
> > fit is replaced by something better, we are better off for it. We
> > shouldn't fight for C++ for the sake of it. Either it is good at
> > something (hopefully many somethings), or it gets replaced.
>
> Well given they don't teach C++ anymore and government agencies don't
> want to use non-memory safe languages anymore then it's just a question
> of a few years until it dissolves unless we're being proactive on the issue.

Ever heard of COBOL?

Even if everyone stopped writing new C++ programs tomorrow, C++ would still be
in use for another couple of decades, just out of sheer maintenance of the
installed base. That alone is reason enough to keep evolving it.

> I think Rust is still embryonic but all it has to do is to copy the
> various abstractions already made by the ISO C++ standards and popular
> libraries in order to grow quickly.

Or we don't. At least, we shouldn't copy *all* of them. There's no harm in
learning what works there and seeing what we can apply here. We should do
that, where possible and meaningful.

But I disagree we should copy it all. If we did, we'd end up with Rust plus a
bunch of legacy, which is unlikely to be as useful. If Rust has a market, let
it have it. C++ has a market, a niche. There s nothing wrong in other
languages existing.

What's important is that C++ have a purpose and be good at it. Abandoning the
purpose of what makes C++ good and trying to copy what made another language
good is not a good strategy, IMHO.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Principal Engineer - Intel DCAI Platform & System Engineering

Received on 2024-11-12 06:11:00