C++ Logo

sg15

Advanced search

Re: [isocpp-sg21] Contracts and tooling

From: Daniela Engert <dani_at_[hidden]>
Date: Fri, 17 Nov 2023 12:09:18 +0100
Am 17.11.2023 um 08:39 schrieb Ville Voutilainen via SG15:
> On Fri, 17 Nov 2023 at 09:16, Boris Kolpackov <boris_at_[hidden]> wrote:
>> Ville Voutilainen via SG15 <sg15_at_[hidden]> writes:
>>
>>> I would hesitate to suggest or leave room for the impression that
>>> modules were standardized without adequate tooling consideration.
>>> Furthermore, some new language facilities just do have adoption
>>> challenges, that's sometimes the nature of the beast. The
>>> tooling-feedback from e.g. build system developers hasn't thus far
>>> revealed a need to do major design surgery to modules, as far as I
>>> have understood.
>> To add to what Ben said, there is a growing sentiment in the community
>> that header units are basically unimplementable and should just be
>> dropped.
> Fascinating. There was a time when they were OMDB-insisted to be a
> must-have, and
> were said to be the bee's knees and the only form of modules that can
> ever work, and
> named modules were said to be the polar opposite of that and
> completely pointless,
> by some parties involved. It's truly fascinating if we then end up in
> a situation
> where we have named modules with strong ownership and don't bother
> with importable
> headers. I mean, that was a likely outcome anyway, the only unclear
> thing was what
> the migration path to that point will be. :P
Current experience shows that named modules work well and are the way
forward. Despite premature declarations of the death of header units,
they *are* implementable (as extensive use shows) and have their uses.
For (a small and minor) example, my modularized standard libraries for
e.g. libstdc++ and ms-stl are testiment.

I totally agree with the sentiment that implementing them *correctly* -
in particular when it comes to tooling. They are the most problematic
and difficult thing in the whole modules realm. I think, there is an
impedance mismatch: once touted as "the easy path to modules", it is
quite the opposite in reality. Agnostic of any experience, people are
asking me on every occasion how they can use their existing libraries by
converting their headers into header units. And they are only mildly
deterred when they learn that they have a longer way to go than they've
anticipated before. I'm obviously failing in teaching how to properly
create modules - despite all my efforts in the past years.

Dani

Received on 2023-11-17 11:09:22