From: Miguel Ojeda <email@example.com>
To: David Laight <David.Laight@aculab.com>
Cc: Adrian Bunk <firstname.lastname@example.org>,
Linus Torvalds <email@example.com>,
Tom Stellard <firstname.lastname@example.org>,
Nick Desaulniers <email@example.com>,
Masahiro Yamada <firstname.lastname@example.org>,
Nathan Chancellor <email@example.com>,
Linux Kernel Mailing List <firstname.lastname@example.org>,
Fangrui Song <email@example.com>,
Serge Guelton <firstname.lastname@example.org>,
Sylvestre Ledru <email@example.com>
Subject: Re: Very slow clang kernel config ..
Date: Wed, 5 May 2021 19:55:12 +0200 [thread overview]
Message-ID: <CANiq72mX-F_EX0pydAgmHBMFEM5EPzCo8gqxS6h_YmmQ8u1POA@mail.gmail.com> (raw)
On Wed, May 5, 2021 at 6:25 PM David Laight <David.Laight@aculab.com> wrote:
> But it is the customer's customer who comes back to you saying
> that something in your library is broken.
> This is when you really don't what static linking - ever.
In that case, you need to refer them to your (direct) customer. I
understand where you are coming from (e.g. Microsoft also encourages
developers to avoid static linking their CRT), but there is no good
solution for that -- some of your direct customers will require you
provide the version for static linking nevertheless, so your only
approach would be gating access to the static version somehow.
> Static linking is much worse because different parts of the 'system'
> are provided by different people.
> With a little care a C shared library can be implemented by different
> companies while still meeting the same ABI.
I assume you are talking about things like program plugins in the form
of shared libraries (e.g. a different renderers in 3D suites,
different chess engines, mods in a videogame, etc.).
In that case, well, if you really need a customer of yours to swap
libraries without rebuilding the host program, because you want other
companies to provide plugins, then obviously static linking is not the
way to go. But shared libraries are just one possible solution in that
space anyway, there is also IPC of different kinds, bytecode VMs,
> It this case it was done to give the software engineers some
> experience of writing C++.
> Technically it was a big mistake.
> Bad C++ is also infinitely worse that bad C.
> Exception handling (which you might think of as a gain)
> is very easy to get badly wrong.
> Class member overloads make it impossible to work out where data is used.
> Function overloads are sometimes nice - but unnecessary.
Agreed! While, in general, this applies to any language, it is
specially dangerous in languages with UB. And, among those, C++ is
very complex, which in turn can produce very subtle UB issues. This
was understood by Rust designers, and the language is an attempt to
minimize UB while, at the same time, providing higher-level features
next prev parent reply other threads:[~2021-05-05 18:04 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-29 21:53 Very slow clang kernel config Linus Torvalds
2021-04-30 0:19 ` Nick Desaulniers
2021-04-30 2:22 ` Nick Desaulniers
2021-05-01 0:19 ` Nick Desaulniers
2021-05-01 0:23 ` Nick Desaulniers
2021-05-01 0:25 ` Nick Desaulniers
2021-05-01 0:40 ` Nick Desaulniers
2021-05-01 1:22 ` Linus Torvalds
2021-05-01 1:48 ` Nick Desaulniers
2021-05-01 2:16 ` Fangrui Song
2021-05-01 3:32 ` Tom Stellard
2021-05-01 16:32 ` Linus Torvalds
2021-05-01 19:57 ` Serge Guelton
2021-05-01 22:39 ` Linus Torvalds
2021-05-01 23:55 ` Fangrui Song
2021-05-01 21:58 ` David Laight
2021-05-02 9:31 ` Adrian Bunk
2021-05-02 11:35 ` David Laight
2021-05-02 16:12 ` Linus Torvalds
2021-05-02 16:45 ` Adrian Bunk
2021-05-02 16:49 ` Linus Torvalds
2021-05-02 17:55 ` Adrian Bunk
2021-05-02 17:59 ` Linus Torvalds
2021-05-02 21:48 ` Adrian Bunk
2021-05-04 22:02 ` Miguel Ojeda
2021-05-05 0:58 ` Theodore Ts'o
2021-05-05 17:21 ` Miguel Ojeda
2021-05-04 21:32 ` Miguel Ojeda
2021-05-05 11:05 ` David Laight
2021-05-05 13:53 ` Miguel Ojeda
2021-05-05 14:13 ` David Laight
2021-05-05 16:06 ` Miguel Ojeda
2021-05-05 16:25 ` David Laight
2021-05-05 17:55 ` Miguel Ojeda [this message]
2021-05-03 1:03 ` Maciej W. Rozycki
2021-05-03 14:38 ` Theodore Ts'o
2021-05-03 14:54 ` Theodore Ts'o
2021-05-03 17:14 ` Maciej W. Rozycki
2021-05-03 16:09 ` David Laight
2021-05-04 23:04 ` Greg Stark
2021-05-05 0:55 ` Theodore Ts'o
2021-05-01 23:37 ` Mike Hommey
2021-05-02 5:19 ` Dan Aloni
2021-05-03 16:48 ` Tom Stellard
2021-05-03 19:00 ` Fangrui Song
2021-04-30 0:52 ` Nathan Chancellor
2021-04-30 2:21 ` Nick Desaulniers
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).